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.
This commit is contained in:
Sanjay Jangid 2025-07-14 19:08:28 +05:30 committed by GitHub
parent 838b8537b6
commit a531d4dbf6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -644,8 +644,7 @@ ngx_http_v3_parse_literal(ngx_connection_t *c, ngx_http_v3_parse_literal_t *st,
} }
ch = *b->pos++; ch = *b->pos++;
if (st->huffman) {
if (st->huffman) {
if (ngx_http_huff_decode(&st->huffstate, &ch, 1, &st->last, if (ngx_http_huff_decode(&st->huffstate, &ch, 1, &st->last,
st->length == 1, c->log) st->length == 1, c->log)
!= NGX_OK) != NGX_OK)