aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-04-11 16:23:06 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-04-11 16:23:06 +0000
commit22d88fb28e9610f1d20228149004192976524741 (patch)
tree40d724915d530876d6fdcd3becb69100025432a6 /lib/url.c
parentf7c5b28e76d2934a3f22d1f4660d79ee3b67e0ff (diff)
ah, move the zero byte too or havoc will occur
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index 1daa658be..1cd493cbc 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1984,8 +1984,8 @@ static CURLcode CreateConnection(struct SessionHandle *data,
if(conn->path[0] == '?') {
/* We need this function to deal with overlapping memory areas. We know
that the memory area 'path' points to is 'urllen' bytes big and that
- is bigger than the path. */
- memmove(&conn->path[1], conn->path, strlen(conn->path));
+ is bigger than the path. Use +1 to move the zero byte too. */
+ memmove(&conn->path[1], conn->path, strlen(conn->path)+1);
conn->path[0] = '/';
}