mirror of
https://github.com/curl/curl.git
synced 2026-04-15 01:01:41 +03:00
url: fix NULL deref with bad password when no user is provided
Closes #17659
This commit is contained in:
parent
aaebb45f58
commit
f9548bf20e
1 changed files with 7 additions and 5 deletions
12
lib/url.c
12
lib/url.c
|
|
@ -2762,11 +2762,13 @@ static CURLcode parse_remote_port(struct Curl_easy *data,
|
|||
|
||||
static bool str_has_ctrl(const char *input)
|
||||
{
|
||||
const unsigned char *str = (const unsigned char *)input;
|
||||
while(*str) {
|
||||
if(*str < 0x20)
|
||||
return TRUE;
|
||||
str++;
|
||||
if(input) {
|
||||
const unsigned char *str = (const unsigned char *)input;
|
||||
while(*str) {
|
||||
if(*str < 0x20)
|
||||
return TRUE;
|
||||
str++;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue