summaryrefslogtreecommitdiff
path: root/lib/pingpong.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-12-22 00:17:58 +0100
committerDaniel Stenberg <daniel@haxx.se>2013-12-22 00:20:13 +0100
commitbf468fb58950480289450b94943f1dec0185f739 (patch)
tree143bdb63aa7c66f6b7975c76645a3785380ba101 /lib/pingpong.c
parentca4506b46a8fffaf27cef64ea113312b498eb25e (diff)
downloadcurl-bf468fb58950480289450b94943f1dec0185f739.tar.gz
Curl_pp_readresp: zero terminate line
The comment in the code mentions the zero terminating after having copied data, but it mistakingly zero terminated the source data and not the destination! This caused the test 864 problem discussed on the list: http://curl.haxx.se/mail/lib-2013-12/0113.html Signed-off-by: Daniel Stenberg <daniel@haxx.se>
Diffstat (limited to 'lib/pingpong.c')
-rw-r--r--lib/pingpong.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pingpong.c b/lib/pingpong.c
index 683ae1963..1b2ccd9b5 100644
--- a/lib/pingpong.c
+++ b/lib/pingpong.c
@@ -380,7 +380,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
int n;
for(meow=pp->linestart_resp, n=0; meow<ptr; meow++, n++)
buf[n] = *meow;
- *meow=0; /* zero terminate */
+ buf[n]=0; /* zero terminate */
keepon=FALSE;
pp->linestart_resp = ptr+1; /* advance pointer */
i++; /* skip this before getting out */