mirror of
https://github.com/curl/curl.git
synced 2025-09-08 13:24:59 +03:00
netrc: avoid NULL deref on weird input
A dynbuf that never gets populated might return a NULL, and Coverity could find a way through like that. Closes #17275
This commit is contained in:
parent
412d3c3dc9
commit
613436dbbb
|
@ -247,7 +247,7 @@ static NETRCcode parsenetrc(struct store_netrc *store,
|
|||
}
|
||||
break;
|
||||
case MACDEF:
|
||||
if(!*tok)
|
||||
if(!tok || !*tok)
|
||||
state = NOTHING;
|
||||
break;
|
||||
case HOSTFOUND:
|
||||
|
|
Loading…
Reference in New Issue
Block a user