From: Maya Dagon (mdagon) Date: Mon, 21 Aug 2023 12:40:10 +0000 (+0000) Subject: Pull request #3960: http2_inspect: handle empty header name X-Git-Tag: 3.1.69.0~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=966d85b767d868adae2a3eb8d8873c3120259eeb;p=thirdparty%2Fsnort3.git Pull request #3960: http2_inspect: handle empty header name Merge in SNORT/snort3 from ~MDAGON/snort3:zero_hdr to master Squashed commit of the following: commit ea086e6a5be6780942c0a72d5b57dc4e4c4d6c97 Author: maya dagon Date: Wed Aug 16 07:49:32 2023 -0400 http2_inspect: handle empty header name --- diff --git a/src/service_inspectors/http2_inspect/http2_hpack.cc b/src/service_inspectors/http2_inspect/http2_hpack.cc index ddb3ab4a0..6e28f40d7 100644 --- a/src/service_inspectors/http2_inspect/http2_hpack.cc +++ b/src/service_inspectors/http2_inspect/http2_hpack.cc @@ -342,7 +342,7 @@ bool Http2HpackDecoder::decode_header_line(const uint8_t* encoded_header_buffer, // Handle pseudoheaders if (ret and bytes_written > 0) { - if (decoded_header_buffer[0] == ':') + if (decoded_header_buffer[0] == ':' and name.length() != 0) { if (pseudo_headers_allowed) start_line->process_pseudo_header(name, value);