~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Centralise calls to fcntl into functions that carefully check the
[sgt/putty]
/
sftp.c
diff --git
a/sftp.c
b/sftp.c
index
927f4d9
..
bf75779
100644
(file)
--- a/
sftp.c
+++ b/
sftp.c
@@
-150,7
+150,7
@@
static int sftp_pkt_getstring(struct sftp_packet *pkt,
*p = NULL;
if (pkt->length - pkt->savedpos < 4)
return 0;
*p = NULL;
if (pkt->length - pkt->savedpos < 4)
return 0;
- *length =
GET_32BIT(pkt->data + pkt->savedpos
);
+ *length =
toint(GET_32BIT(pkt->data + pkt->savedpos)
);
pkt->savedpos += 4;
if ((int)(pkt->length - pkt->savedpos) < *length || *length < 0) {
*length = 0;
pkt->savedpos += 4;
if ((int)(pkt->length - pkt->savedpos) < *length || *length < 0) {
*length = 0;