← Commit list

da6fbb12a6

Viktor Szakats
Viktor Szakats
2026-03-02
SUCCESS Duration: 339s

Subject

http1: fix potential NULL dereference in `Curl_h1_req_parse_read()`

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/http1.c+5 -0
@@ -269,6 +269,11 @@ CURLcode Curl_h1_req_parse_read(struct h1_req_parser *parser,
size_t nread;
*pnread = 0;
+
+ DEBUGASSERT(buf);
+ if(!buf)
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+
while(!parser->done) {
result = next_line(parser, buf, buflen, options, &nread);
if(result) {