mirror of
https://github.com/curl/curl.git
synced 2026-07-23 06:17:16 +03:00
idn: fix WinIDN null ptr deref on bad host
- Return CURLE_URL_MALFORMAT if IDN hostname cannot be converted from UTF-8 to UTF-16. Prior to this change a failed conversion erroneously returned CURLE_OK which meant 'decoded' pointer (what would normally point to the punycode) would not be written to, remain NULL and be dereferenced causing an access violation. Closes https://github.com/curl/curl/pull/11983
This commit is contained in:
parent
7d55ab1bff
commit
021d04f291
1 changed files with 2 additions and 0 deletions
|
|
@ -91,6 +91,8 @@ static CURLcode win32_idn_to_ascii(const char *in, char **out)
|
|||
else
|
||||
return CURLE_URL_MALFORMAT;
|
||||
}
|
||||
else
|
||||
return CURLE_URL_MALFORMAT;
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue