Skip to content
Snippets Groups Projects
Commit d9a77730 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

added precautions to not go insane when two matching cookies end up in the

cookie list, even though they're not supposed to do that...
parent 2b149168
No related branches found
No related tags found
No related merge requests found
......@@ -377,8 +377,15 @@ Curl_cookie_add(struct CookieInfo *c,
free(co); /* free the newly alloced memory */
co = clist; /* point to the previous struct instead */
}
/* We have replaced a cookie, now skip the rest of the list but
make sure the 'lastc' pointer is properly set */
do {
lastc = clist;
clist = clist->next;
} while(clist);
break;
}
}
lastc = clist;
clist = clist->next;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment