mirror of
https://github.com/curl/curl.git
synced 2026-07-24 02:47:17 +03:00
urlapi: avoid derefencing a possible NULL pointer
Coverity CID 1439134
This commit is contained in:
parent
82846a456a
commit
01dedc99fc
1 changed files with 2 additions and 2 deletions
|
|
@ -438,10 +438,10 @@ static CURLUcode parse_hostname_login(struct Curl_URL *u,
|
|||
*hostname = ++ptr;
|
||||
|
||||
/* We could use the login information in the URL so extract it. Only parse
|
||||
options if the handler says we should. */
|
||||
options if the handler says we should. Note that 'h' might be NULL! */
|
||||
ccode = Curl_parse_login_details(login, ptr - login - 1,
|
||||
&userp, &passwdp,
|
||||
h->flags & PROTOPT_URLOPTIONS ?
|
||||
(h && (h->flags & PROTOPT_URLOPTIONS)) ?
|
||||
&optionsp:NULL);
|
||||
if(ccode) {
|
||||
result = CURLUE_MALFORMED_INPUT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue