Skip to content

fix a segfault if flushing cookies with no CookieInfo set - #3613

Closed
m6w6 wants to merge 1 commit into
curl:masterfrom
m6w6:fix-segfault-flush-cookies
Closed

m6w6 wants to merge 1 commit into
curl:masterfrom
m6w6:fix-segfault-flush-cookies

Conversation

@m6w6

@m6w6 m6w6 commented Feb 25, 2019

Copy link
Copy Markdown
Contributor

a52e46f removed a NULL check, reintroduced here.

@bagder

bagder commented Feb 25, 2019 •

Copy link
Copy Markdown
Member

I've struggled to understand how we end up with data->cookies being NULL while data->set.str[STRING_COOKIEJAR] is set. It seeems to indicate a problem somewhere and this just paints over that symptom.

I think the explanation is related to cookie sharing and changing that share in a specific handle. Like here:

curl/lib/setopt.c

Line 1995 in 90236ed

data->cookies = NULL;

@bagder bagder closed this in 8eddb8f Feb 26, 2019
@bagder

bagder commented Feb 26, 2019

Copy link
Copy Markdown
Member

Thanks!

@m6w6

m6w6 commented Feb 26, 2019

Copy link
Copy Markdown
Contributor Author

I'm sorry, that I cannot give more insight. What I can say, though, is that I always use multi and I always use share and I always enable cookie sharing and I always flush cookies, but I do not always use a cookie file/jar.

@m6w6
m6w6 deleted the fix-segfault-flush-cookies branch February 26, 2019 09:40
@lock lock Bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants