Skip to content

check the return value of curl_url()#7917

Closed
x2018 wants to merge 1 commit intocurl:masterfrom
x2018:return_check
Closed

check the return value of curl_url()#7917
x2018 wants to merge 1 commit intocurl:masterfrom
x2018:return_check

Conversation

@x2018
Copy link
Copy Markdown
Contributor

@x2018 x2018 commented Oct 28, 2021

curl_url() [lib/url.c:2396] is a memory allocation function, however, the return value of it is not properly checked.
Though curl_url_set() [lib/url.c:2402] checks it and then returns CURLUE_BAD_HANDLE, this will still confuse the proper result of parse_proxy().

Copy link
Copy Markdown
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this is nicer

@bagder
Copy link
Copy Markdown
Member

bagder commented Oct 28, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants