projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
700cd58
)
Null terminate string in buffer before feeding it to strtol()
author
Yang Tse
<yangsita@gmail.com>
Fri, 14 Jul 2006 06:31:41 +0000
(06:31 +0000)
committer
Yang Tse
<yangsita@gmail.com>
Fri, 14 Jul 2006 06:31:41 +0000
(06:31 +0000)
tests/server/sockfilt.c
patch
|
blob
|
history
diff --git
a/tests/server/sockfilt.c
b/tests/server/sockfilt.c
index
333e02f
..
4b9fec4
100644
(file)
--- a/
tests/server/sockfilt.c
+++ b/
tests/server/sockfilt.c
@@
-290,6
+290,7
@@
static int juggle(curl_socket_t *sockfdp,
if(5 != read(fileno(stdin), buffer, 5))
return FALSE;
+ buffer[4] = '\0';
len = (ssize_t)strtol((char *)buffer, NULL, 16);
if(len != read(fileno(stdin), buffer, len))