From 2618e4caaee451c83dbe9fc033cf9e3e77a41851 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 24 Dec 2013 21:29:18 +0100 Subject: Curl_pp_readresp: use memmove not memcpy, possibly overlapping areas Fixes commit 1deac31eba7 --- lib/pingpong.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pingpong.c') diff --git a/lib/pingpong.c b/lib/pingpong.c index eca385e48..c7e89d0a8 100644 --- a/lib/pingpong.c +++ b/lib/pingpong.c @@ -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 */ -- cgit v1.2.3