Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-SSH2 CPAN distribution.

Report information
The Basics
Id:
56592
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
Robert-jean.Denault [...] telus.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Receive Splice warning when using calling connect with a file descriptor or IO::Socket
Date: Wed, 14 Apr 2010 14:28:25 -0400
To: "'bug-Net-SSH2@rt.cpan.org'" <bug-Net-SSH2@rt.cpan.org>
From: Robert-Jean Denault <Robert-jean.Denault@telus.com>

Description of the bug:

 

When making a call to $ssh->connect() with a file descriptor or IO::Handle, Net::SSH2 emits the following warning message:

splice() offset past end of array at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Net/SSH2.pm line 215, <GEN0> line 2.

 

The error is caused by the line, @_ list at this point is empty.

 my %opts = splice @_, 2;

 

Version information

 

 

Distribution Name:          Net-SSH2-0.28

Perl Version:                      perl, v5.8.8 built for i386-linux-thread-multi

Operating System:          Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 i386 GNU/Linux

 

Code to reproduce the problem:

 

#!/usr/bin/perl

use strict;

use warnings;

use FileHandle;

use DirHandle;

use Carp;

use File::Find;

use File::Copy;

use File::Path;

use File::Basename;

use File::Temp;

use Net::SSH2;

use Net::HTTPTunnel;

 

 

my $tunnel = Net::HTTPTunnel->new(  'proxy-host' => '142.168.66.148',

                                    'proxy-port' => 3128,

                                    'remote-host' => '142.168.66.79',

                                    'remote-port' => 22 );

 

my $ssh = Net::SSH2->new();

$ssh->connect($tunnel);

 

 

Correction to SSH2.pm

 

diff -c SSH2.pm-fixed SSH2.pm                                                                                       

*** SSH2.pm-fixed       2010-04-14 14:09:27.000000000 -0400

--- SSH2.pm     2010-04-14 13:33:07.000000000 -0400

***************

*** 212,219 ****

          }

      }

 

!     my %opts;

!     %opts = splice @_, 2 if (@_ > 2);

      $opts{Timeout} ||= 30;

 

      if (@_ == 2) {

--- 212,218 ----

          }

      }

 

!     my %opts = splice @_, 2;

      $opts{Timeout} ||= 30;

 

      if (@_ == 2) {

 

 

Regards,

Robert Denault
Programmeur-analyste principal / Senior Programmer-Analyst

TELUS Solutions en santé | avec l’expertise d’Emergis
TELUS Health Solutions | backed by Emergis
T : (450) 928 6000 x 3740
T : 1 (866) 363 7447 x 3740
robert.denault@telus.com 
telussante.com  telushealth.com

 

http://emergisweb/emergis/communications/promo/THS_bbE_Fre_RGB.gif

L'information contenue dans ce message, y compris les fichiers joints, est de nature exclusive et confidentielle, et ne doit être utilisée que par le destinataire. Ce message peut contenir des renseignements réservés, sujets aux dispositions des lois sur la confidentialité. En conservant et en utilisant les renseignements contenus dans ce message, le destinataire autorisé s'engage à protéger l'information qu'il contient contre la perte, la divulgation, le vol ou l'exposition à tout risque, en appliquant des précautions au moins égales à celles qu'il utilise pour la protection de ses propres renseignements personnels. Toute diffusion ou utilisation de l'information contenue dans ce message par une personne autre que son destinataire explicite constitue un acte non autorisé et potentiellement illicite. Si vous avez reçu ce message par erreur, veuillez nous aviser en répondant à l'expéditeur et détruire toutes les copies du message en votre possession.

The information contained herein, including any attachments, is proprietary and confidential and is intended for the exclusive use of the addressee. It also may contain privileged information and/or personal information subject to privacy legislation. The authorized addressee of this information, by its retention and use, agrees to protect the information contained herein from loss, disclosure, theft or compromise with at least the same care it employs to protect its own confidential information. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. If you have received this e-mail in error, please notify us immediately by reply e-mail and destroy all copies.

 

Image displayed inline above

Fixed in 0.29 .


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.