From: Daniel Stenberg Date: Wed, 26 Nov 2025 10:01:09 +0000 (+0100) Subject: http: fix OOM exit in Curl_http_follow X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d2bb9c7c6d6ccdc48bb0414b80204acbd29f923;p=thirdparty%2Fcurl.git http: fix OOM exit in Curl_http_follow Spotted by "strict torture" tests. Closes #19705 --- 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);