mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:03:36 +03:00
test763: verify IDN hostname with zero width characters only
Bonus: fix memory leak in exit path from 967a626af4
Closes #18465
This commit is contained in:
parent
71c9706959
commit
de86c2483f
3 changed files with 33 additions and 1 deletions
|
|
@ -324,8 +324,10 @@ CURLcode Curl_idn_decode(const char *input, char **output)
|
|||
}
|
||||
#endif
|
||||
if(!result) {
|
||||
if(!d[0]) /* ended up zero length, not acceptable */
|
||||
if(!d[0]) { /* ended up zero length, not acceptable */
|
||||
result = CURLE_URL_MALFORMAT;
|
||||
free(d);
|
||||
}
|
||||
else
|
||||
*output = d;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue