← Commit list

93e91e965e

Stefan Eissing
Stefan Eissing
2025-10-09
SUCCESS Duration: 154s

Subject

http2: check push header names by length first

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+2 -1
@@ -1590,7 +1590,8 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
if(frame->hd.type == NGHTTP2_PUSH_PROMISE) {
char *h;
- if(!strcmp(HTTP_PSEUDO_AUTHORITY, (const char *)name)) {
+ if((namelen == (sizeof(HTTP_PSEUDO_AUTHORITY)-1)) &&
+ !strncmp(HTTP_PSEUDO_AUTHORITY, (const char *)name, namelen)) {
/* pseudo headers are lower case */
int rc = 0;
char *check = curl_maprintf("%s:%d", cf->conn->host.name,