From 1cdc66d927e6476f422ad3266c34ab766b1260ea Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 28 Oct 2003 09:17:15 +0000 Subject: overlapping memory chunks with strcpy(), detected by the friendly valgrind --- lib/url.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index 62a4148c7..ac2b6be96 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2035,7 +2035,8 @@ static CURLcode CreateConnection(struct SessionHandle *data, used truly as a separator */ ptr++; - strcpy(conn->path, ptr); + /* This cannot be made with strcpy, as the memory chunks overlap! */ + memmove(conn->path, ptr, strlen(ptr)+1); } } -- cgit v1.2.3