]> granicus.if.org Git - curl/commitdiff
Curl_pp_readresp: use memmove not memcpy, possibly overlapping areas
authorDaniel Stenberg <daniel@haxx.se>
Tue, 24 Dec 2013 20:29:18 +0000 (21:29 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 24 Dec 2013 20:29:18 +0000 (21:29 +0100)
Fixes commit 1deac31eba7

lib/pingpong.c

index eca385e489b86a690f7da0cbe8d6f66a1fb0b4f5..c7e89d0a828a84a87bcc26ebefe16326bc276cf6 100644 (file)
@@ -377,7 +377,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
             /* This is the end of the last line, copy the last line to the
                start of the buffer and zero terminate, for old times sake */
             size_t n = ptr - pp->linestart_resp;
-            memcpy(buf, pp->linestart_resp, n);
+            memmove(buf, pp->linestart_resp, n);
             buf[n]=0; /* zero terminate */
             keepon=FALSE;
             pp->linestart_resp = ptr+1; /* advance pointer */