]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
urlapi: return OOM correctly from parse_hostname_login()
authorDaniel Stenberg <daniel@haxx.se>
Fri, 26 Dec 2025 12:05:20 +0000 (13:05 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 27 Dec 2025 15:25:55 +0000 (16:25 +0100)
Closes #20100

lib/urlapi.c

index 5a424829c0a37215d41f0fcd56308fe07229fc52..c8a7a8c280578beeeb1a160b3c5b6c9ee18db693 100644 (file)
@@ -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;
   }