mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 07:38:49 -05:00
cookie: avoid NULL dereference
... when expiring old cookies. Reported-by: Pavel Gushchin Fixes #2032 Closes #2035
This commit is contained in:
parent
52d9a11c1c
commit
fa394c8c2e
@ -309,7 +309,7 @@ static void remove_expired(struct CookieInfo *cookies)
|
||||
while(co) {
|
||||
nx = co->next;
|
||||
if(co->expires && co->expires < now) {
|
||||
if(co == cookies->cookies) {
|
||||
if(!pv) {
|
||||
cookies->cookies = co->next;
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user