From 6dac2631df4b513e89464c29b257d168ce32155e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 18 Nov 2025 14:29:36 +0100 Subject: [PATCH] url: if OOM in parse_proxy() return error Closes #19590 --- lib/url.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/url.c b/lib/url.c index cf34514b1a..527d698390 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2285,7 +2285,11 @@ static CURLcode parse_proxy(struct Curl_easy *data, conn->bits.proxy_user_passwd = TRUE; /* enable it */ } - (void)curl_url_get(uhp, CURLUPART_PORT, &portptr, 0); + uc = curl_url_get(uhp, CURLUPART_PORT, &portptr, 0); + if(uc == CURLUE_OUT_OF_MEMORY) { + result = CURLE_OUT_OF_MEMORY; + goto error; + } if(portptr) { curl_off_t num; -- 2.47.3