aboutsummaryrefslogtreecommitdiff
path: root/libssh/sftp.c
diff options
context:
space:
mode:
authorBernhard R. Link <brlink@debian.org>2009-10-23 22:20:16 +0200
committerAndreas Schneider <mail@cynapses.org>2009-10-25 09:50:06 +0100
commitef8246a592d374cfc6e5818365037c07ee7d7b3b (patch)
tree909c47ae2650c8de4c429187b5cb3b6a312be892 /libssh/sftp.c
parent110d201e026824a742950f0c04f3334638d2b09f (diff)
downloadlibssh-ef8246a592d374cfc6e5818365037c07ee7d7b3b.tar.gz
libssh-ef8246a592d374cfc6e5818365037c07ee7d7b3b.tar.xz
libssh-ef8246a592d374cfc6e5818365037c07ee7d7b3b.zip
buffer_get_data returns 0 on error, so checking buffer_get_u* for < 0 makes no sense
Signed-off-by: Andreas Schneider <mail@cynapses.org>
Diffstat (limited to 'libssh/sftp.c')
-rw-r--r--libssh/sftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libssh/sftp.c b/libssh/sftp.c
index bc5e6379..c6a7e576 100644
--- a/libssh/sftp.c
+++ b/libssh/sftp.c
@@ -303,7 +303,7 @@ sftp_packet sftp_packet_read(sftp_session sftp) {
return NULL;
}
- if (buffer_get_u32(packet->payload, &size) < 0) {
+ if (buffer_get_u32(packet->payload, &size) != sizeof(uint32_t)) {
buffer_free(packet->payload);
SAFE_FREE(packet);
sftp_leave_function();