mirror of
https://github.com/curl/curl.git
synced 2026-07-23 18:37:17 +03:00
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>
This commit is contained in:
parent
ca4506b46a
commit
bf468fb589
1 changed files with 1 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue