← Commit list

01623e26d0

Daniel Stenberg
Daniel Stenberg
2025-11-20
SUCCESS Duration: 145s

Subject

http: error on OOM when creating range header

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/http.c+2 -0
@@ -2538,6 +2538,8 @@ static CURLcode http_range(struct Curl_easy *data,
free(data->state.aptr.rangeline);
data->state.aptr.rangeline = curl_maprintf("Range: bytes=%s\r\n",
data->state.range);
+ if(!data->state.aptr.rangeline)
+ return CURLE_OUT_OF_MEMORY;
}
else if((httpreq == HTTPREQ_POST || httpreq == HTTPREQ_PUT) &&
!Curl_checkheaders(data, STRCONST("Content-Range"))) {