← Commit list

967a626af4

Daniel Stenberg
Daniel Stenberg
2025-09-03
FAILED Duration: 153s

Subject

idn: reject conversions that end up as a zero length hostname

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/idn.c+6 -2
@@ -323,8 +323,12 @@ CURLcode Curl_idn_decode(const char *input, char **output)
result = CURLE_OUT_OF_MEMORY;
}
#endif
- if(!result)
- *output = d;
+ if(!result) {
+ if(!d[0]) /* ended up zero length, not acceptable */
+ result = CURLE_URL_MALFORMAT;
+ else
+ *output = d;
+ }
return result;
}