From: Daniel Stenberg Date: Fri, 26 Dec 2025 12:05:20 +0000 (+0100) Subject: urlapi: return OOM correctly from parse_hostname_login() X-Git-Tag: curl-8_18_0~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e054134b7e8a562126cd9f4b28cb51143eca2a9;p=thirdparty%2Fcurl.git urlapi: return OOM correctly from parse_hostname_login() Closes #20100 --- diff --git a/lib/urlapi.c b/lib/urlapi.c index 5a424829c0..c8a7a8c280 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -368,7 +368,8 @@ static CURLUcode parse_hostname_login(struct Curl_URL *u, (h && (h->flags & PROTOPT_URLOPTIONS)) ? &optionsp : NULL); if(ccode) { - result = CURLUE_BAD_LOGIN; + result = (ccode == CURLE_OUT_OF_MEMORY) ? CURLUE_OUT_OF_MEMORY : + CURLUE_BAD_LOGIN; goto out; }