aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-06-30 22:17:35 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-06-30 22:17:35 +0200
commit2c99566697d4757e95ba440d1ba40f8302b77799 (patch)
treea982225006cb94167ac44c7b1a8134ea49b7651c /libssh
parent42470857e298f4f947803b2f695ea55dd2b0b8cc (diff)
downloadlibssh-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')
-rw-r--r--libssh/sftp.c2
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;