From 0d2bb9c7c6d6ccdc48bb0414b80204acbd29f923 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 26 Nov 2025 11:01:09 +0100 Subject: [PATCH] http: fix OOM exit in Curl_http_follow Spotted by "strict torture" tests. Closes #19705 --- lib/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http.c b/lib/http.c index ae932cd7c9..144a898ea0 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1282,7 +1282,7 @@ CURLcode Curl_http_follow(struct Curl_easy *data, const char *newurl, CURLU_ALLOW_SPACE | (data->set.path_as_is ? CURLU_PATH_AS_IS : 0))); if(uc) { - if(type != FOLLOW_FAKE) { + if((uc == CURLUE_OUT_OF_MEMORY) || (type != FOLLOW_FAKE)) { failf(data, "The redirect target URL could not be parsed: %s", curl_url_strerror(uc)); return Curl_uc_to_curlcode(uc); -- 2.47.3