aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-08-15 08:58:26 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2005-08-15 08:58:26 +0000
commit82d15b68d4645b9e211ce1e0521487c06c47c5ce (patch)
treef92a50c37cbca4b9ba97ddf3aa7338cad3709f12 /sshfs.c
parent2d959740ea5139fdea75dbae8d902f509581b79b (diff)
downloadsshfs-82d15b68d4645b9e211ce1e0521487c06c47c5ce.tar
sshfs-82d15b68d4645b9e211ce1e0521487c06c47c5ce.tar.gz
sshfs-82d15b68d4645b9e211ce1e0521487c06c47c5ce.tar.bz2
sshfs-82d15b68d4645b9e211ce1e0521487c06c47c5ce.zip
release 1.2
Diffstat (limited to 'sshfs.c')
-rw-r--r--sshfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sshfs.c b/sshfs.c
index b20b684..18ab34c 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -717,12 +717,14 @@ static int sftp_read(uint8_t *type, struct buffer *buf)
buf_init(&buf2, 5);
res = do_read(&buf2);
if (res != -1) {
- buf_get_uint32(&buf2, &len);
+ if (buf_get_uint32(&buf2, &len) == -1)
+ return -1;
if (len > MAX_REPLY_LEN) {
fprintf(stderr, "reply len too large: %u\n", len);
return -1;
}
- buf_get_uint8(&buf2, type);
+ if (buf_get_uint8(&buf2, type) == -1)
+ return -1;
buf_init(buf, len - 1);
res = do_read(buf);
}