mirror of
https://github.com/curl/curl.git
synced 2026-06-16 21:45:40 +03:00
IPv6 cookie domain: get rid of the first bracket before the second.
Commit 97b66ebe was copying a smaller buffer, thus duplicating the last
character.
This commit is contained in:
parent
7031ff23bb
commit
ad595c3ba9
1 changed files with 3 additions and 3 deletions
|
|
@ -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, ':');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue