From: Daniel Stenberg Date: Sun, 7 Dec 2025 11:35:42 +0000 (+0100) Subject: http: return OOM errors from hsts properly X-Git-Tag: rc-8_18_0-2~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3f4fd25d3991fe955afa2f5e3994c04339cc842;p=thirdparty%2Fcurl.git http: return OOM errors from hsts properly When Curl_hsts_parse() fails with out of memory, return it to parent. Closes #19862 --- diff --git a/lib/http.c b/lib/http.c index ba42f19ff0..ce5f5becdf 100644 --- a/lib/http.c +++ b/lib/http.c @@ -3501,8 +3501,11 @@ static CURLcode http_header_s(struct Curl_easy *data, if(v) { CURLcode check = Curl_hsts_parse(data->hsts, conn->host.name, v); - if(check) + if(check) { + if(check == CURLE_OUT_OF_MEMORY) + return check; infof(data, "Illegal STS header skipped"); + } #ifdef DEBUGBUILD else infof(data, "Parsed STS header fine (%zu entries)",