diff options
author | Andrei Cipu <acipu@ixiacom.com> | 2012-04-04 15:35:24 +0300 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-04-04 23:51:41 +0200 |
commit | ad595c3ba9f26f7713ba80da6624d0a391f98d91 (patch) | |
tree | 7267382483f1f766ce241458bb011dfb90228fd4 /lib/http.c | |
parent | 7031ff23bb54116ae08cc1e9d1008e6649b01d41 (diff) |
IPv6 cookie domain: get rid of the first bracket before the second.
Commit 97b66ebe was copying a smaller buffer, thus duplicating the last
character.
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/http.c b/lib/http.c index ec76bbe46..0ce575ba8 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1852,12 +1852,12 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) int startsearch = 0; if(*cookiehost == '[') { char *closingbracket; - closingbracket = strchr(cookiehost+1, ']'); - if(closingbracket) - *closingbracket = 0; /* since the 'cookiehost' is an allocated memory area that will be freed later we cannot simply increment the pointer */ memmove(cookiehost, cookiehost + 1, strlen(cookiehost) - 1); + closingbracket = strchr(cookiehost, ']'); + if(closingbracket) + *closingbracket = 0; } else { char *colon = strchr(cookiehost + startsearch, ':'); |