diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-06-30 22:17:35 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-07-02 10:37:32 +0200 |
commit | 101bf21d414afab092caafcdb83cf035b0d8966b (patch) | |
tree | 1b2c45b9ea61fed3c2f038aace6df26af431a972 | |
parent | ae3bb42da5837d3396e4edeceaa456cb1da8a195 (diff) | |
download | libssh-101bf21d414afab092caafcdb83cf035b0d8966b.tar.gz libssh-101bf21d414afab092caafcdb83cf035b0d8966b.tar.xz libssh-101bf21d414afab092caafcdb83cf035b0d8966b.zip |
Fixed Could not write as much data as expected msg
Bug caused by verifying the size of the buffer in the wrong place
-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; |