Skip to content
Snippets Groups Projects
Unverified Commit 52d07327 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

idn: if idn2_check_version returns NULL, return error

... this avoids a NULL dereference for this unusual case.

Reported-by: s0urc3_ on hackerone
parent 08f9b214
No related merge requests found
......@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment