From: Daniel Stenberg Date: Fri, 11 Apr 2003 16:23:06 +0000 (+0000) Subject: ah, move the zero byte too or havoc will occur X-Git-Tag: curl-7_10_5~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22d88fb28e9610f1d20228149004192976524741;p=curl ah, move the zero byte too or havoc will occur --- 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] = '/'; }