← Commit list

9b36748938

Daniel Stenberg
Daniel Stenberg
2026-03-31
SUCCESS Duration: 245s

Subject

http2: return error on OOM in push headers

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/http2.c+5 -2
@@ -1488,8 +1488,11 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
stream->push_headers = headp;
}
h = curl_maprintf("%s:%s", name, value);
- if(h)
- stream->push_headers[stream->push_headers_used++] = h;
+ if(!h) {
+ free_push_headers(stream);
+ return NGHTTP2_ERR_CALLBACK_FAILURE;
+ }
+ stream->push_headers[stream->push_headers_used++] = h;
return 0;
}