Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
gopher: NULL pointer dereference #3617
I did this
Coverity pointed out this line (CID 1442746), as a possibly doing a NULL pointer dereference:
It seems possible to happen if you build a URL from parts and pass to curl with
(@danielgustafsson we talked on IRC about you grabbing this, which is why you are assigned. I submitted it here just to make sure we don't forget. Feel free to unassign if you're busy.)
I expected the following
It shouldn't be necesarry to check path for NULL there. We should either bail out earlier if it is, or we should make sure that it is never NULL.
current master (509a0d9)
I wrote up a new test to see if this
When a URL is passed with
As this generates a full URL that then later is parsed to pieces again and then we get the default path if it wasn't set previously.
The new test (test 659) that verifies that this is true is part of my PR #3641 - I instead found another CURLU bug that I ended up fixing there.