aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-10-28 09:17:15 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-10-28 09:17:15 +0000
commit1cdc66d927e6476f422ad3266c34ab766b1260ea (patch)
tree57ce69f1e17306c86036cdfa1763563f69629e9b
parentba12c5dedaf1656a8f4cc4f33183dc087926a2a1 (diff)
overlapping memory chunks with strcpy(), detected by the friendly valgrind
-rw-r--r--lib/url.c3
1 files changed, 2 insertions, 1 deletions
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);
}
}