mirror of
https://github.com/curl/curl.git
synced 2026-04-15 00:41:41 +03:00
idn: if idn2_check_version returns NULL, return error
... this avoids a NULL dereference for this unusual case. Reported-by: s0urc3_ on hackerone Closes #11898
This commit is contained in:
parent
0d3956b8c6
commit
7cf269dd1c
1 changed files with 3 additions and 0 deletions
|
|
@ -174,6 +174,9 @@ static CURLcode idn_decode(const char *input, char **output)
|
|||
if(rc != IDN2_OK)
|
||||
result = CURLE_URL_MALFORMAT;
|
||||
}
|
||||
else
|
||||
/* a too old libidn2 version */
|
||||
result = CURLE_NOT_BUILT_IN;
|
||||
#elif defined(USE_WIN32_IDN)
|
||||
result = win32_idn_to_ascii(input, &decoded);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue