From: Daniel Stenberg Date: Mon, 1 Dec 2025 08:26:28 +0000 (+0100) Subject: url: fix return code for OOM in parse_proxy() X-Git-Tag: rc-8_18_0-1~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cffc91284475e78a7d9b0538b9db329fe3249f63;p=thirdparty%2Fcurl.git url: fix return code for OOM in parse_proxy() Closes #19779 --- diff --git a/lib/url.c b/lib/url.c index b4c33236cd..84909f0372 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2250,11 +2250,15 @@ static CURLcode parse_proxy(struct Curl_easy *data, /* Is there a username and password given in this proxy url? */ uc = curl_url_get(uhp, CURLUPART_USER, &proxyuser, CURLU_URLDECODE); - if(uc && (uc != CURLUE_NO_USER)) + if(uc && (uc != CURLUE_NO_USER)) { + result = Curl_uc_to_curlcode(uc); goto error; + } uc = curl_url_get(uhp, CURLUPART_PASSWORD, &proxypasswd, CURLU_URLDECODE); - if(uc && (uc != CURLUE_NO_PASSWORD)) + if(uc && (uc != CURLUE_NO_PASSWORD)) { + result = Curl_uc_to_curlcode(uc); goto error; + } if(proxyuser || proxypasswd) { curlx_free(proxyinfo->user);