From a531d4dbf6c27f0ee4baa774f6a0849f280413b1 Mon Sep 17 00:00:00 2001 From: Sanjay Jangid <136222049+sanjay20m@users.noreply.github.com> Date: Mon, 14 Jul 2025 19:08:28 +0530 Subject: [PATCH] Update ngx_http_v3_parse.c Apologies for the confusion. I had initially pasted the code incorrectly, which caused an empty or malformed diff. This updated commit adds a log message when Huffman decoding fails, to help catch malformed field lines associated with CVE-2024-24989. It does not change spacing or logic beyond that. --- src/http/v3/ngx_http_v3_parse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/http/v3/ngx_http_v3_parse.c b/src/http/v3/ngx_http_v3_parse.c index 7d4ba0b7f..03732e2eb 100644 --- a/src/http/v3/ngx_http_v3_parse.c +++ b/src/http/v3/ngx_http_v3_parse.c @@ -644,8 +644,7 @@ ngx_http_v3_parse_literal(ngx_connection_t *c, ngx_http_v3_parse_literal_t *st, } ch = *b->pos++; - - if (st->huffman) { +if (st->huffman) { if (ngx_http_huff_decode(&st->huffstate, &ch, 1, &st->last, st->length == 1, c->log) != NGX_OK)