Hello all.
I have 2 patches for SFTP subsystem. Please review.
These patches are based on version 0.14. However CVS version still has
the same bugs.
1. libssh2_sftp_read.patch
Function libssh2_sftp_read returns error if it receives
SSH_FXP_STATUS packet. But not all
return codes in this packet are errors, there is also SSH_FX_EOF
code. I think libssh2_sftp_read
should return 0 in such case.
2. libssh2_read_packet_size.patch
libssh2_sftp_packet_read function has a limit of incoming packet
length. It is defined by
LIBSSH2_SFTP_PACKET_MAXLEN macro and currently has value 40000. However
libssh2_sftp_read function requests amount of data equal to passed
buffer size.
Server sends all requested data with one packet and libssh2 gives
error "SFTP packet too large".
This patch fixes libssh2_sftp_read function so it requests data by
pieces it can handle.
P.S. Btw, libssh2_sftp_read function (and many others) ignore error code
returned from libssh2_sftp_packet_requirev and replaces it with too
common ""Timeout waiting for status
message". So user doesn't see real error until he build and install
debug version. I haven't fixed it yet, but it's
very annoying...
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel