diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-06-30 22:17:35 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-06-30 22:17:35 +0200 |
commit | 2c99566697d4757e95ba440d1ba40f8302b77799 (patch) | |
tree | a982225006cb94167ac44c7b1a8134ea49b7651c /libssh/sftp.c | |
parent | 42470857e298f4f947803b2f695ea55dd2b0b8cc (diff) | |
download | libssh-2c99566697d4757e95ba440d1ba40f8302b77799.tar.gz libssh-2c99566697d4757e95ba440d1ba40f8302b77799.tar.xz libssh-2c99566697d4757e95ba440d1ba40f8302b77799.zip |
Fixed Could not write as much data as expected msg
Bug caused by verifying the size of the buffer in the wrong place
Diffstat (limited to 'libssh/sftp.c')
-rw-r--r-- | libssh/sftp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libssh/sftp.c b/libssh/sftp.c index 9776c3d0..4aa63c97 100644 --- a/libssh/sftp.c +++ b/libssh/sftp.c @@ -1705,8 +1705,8 @@ ssize_t sftp_write(SFTP_FILE *file, const void *buf, size_t count) { return -1; } string_free(datastring); - packetlen=buffer_get_len(buffer); len = sftp_packet_write(file->sftp, SSH_FXP_WRITE, buffer); + packetlen=buffer_get_len(buffer); buffer_free(buffer); if (len < 0) { return -1; |