mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Fixed Could not write as much data as expected msg
Bug caused by verifying the size of the buffer in the wrong place
This commit is contained in:
committed by
Andreas Schneider
parent
ae3bb42da5
commit
101bf21d41
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user