mirror of
https://github.com/curl/curl.git
synced 2025-09-14 16:12:43 +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
|
@ -174,6 +174,9 @@ static CURLcode idn_decode(const char *input, char **output)
|
||||||
if(rc != IDN2_OK)
|
if(rc != IDN2_OK)
|
||||||
result = CURLE_URL_MALFORMAT;
|
result = CURLE_URL_MALFORMAT;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
/* a too old libidn2 version */
|
||||||
|
result = CURLE_NOT_BUILT_IN;
|
||||||
#elif defined(USE_WIN32_IDN)
|
#elif defined(USE_WIN32_IDN)
|
||||||
result = win32_idn_to_ascii(input, &decoded);
|
result = win32_idn_to_ascii(input, &decoded);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user