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:
35922
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
rkitover [...] cpan.org
Cc:
AdminCc:

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



read on an SFTP file is segfaulting on line 1562 of SSH2.xs fi->sf seems to be an invalid memory address. version of libssh2 is 0.18 Attached a simple test case. -- Rafael
Subject: segfault.t
#!/usr/bin/perl use strict; use warnings; use Net::SSH2; chomp(my $host = do { print "Enter SFTP host: "; scalar <> }); chomp(my $user = do { print "Enter SFTP user: "; scalar <> }); chomp(my $pass = do { print "Enter SFTP password: "; scalar <> }); chomp(my $path = do { print "Enter remote directory: "; scalar <> }); my $ssh = Net::SSH2->new; $ssh->connect($host); $ssh->auth_password($user, $pass); my $sftp = $ssh->sftp; my $dir = $sftp->opendir($path); while (my $file = $dir->read) { my $name = $file->{name}; next if $name =~ /^..?\z/; my $in = $sftp->open("$path/$name"); # This segfaults. $in->read(my $buf, 4096); }
Forgot to mention this only happens on perl 5.10, everything works fine on 5.8.8 -- Rafael
That is already fixed.


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.