]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3960: http2_inspect: handle empty header name
authorMaya Dagon (mdagon) <mdagon@cisco.com>
Mon, 21 Aug 2023 12:40:10 +0000 (12:40 +0000)
committerOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Mon, 21 Aug 2023 12:40:10 +0000 (12:40 +0000)
Merge in SNORT/snort3 from ~MDAGON/snort3:zero_hdr to master

Squashed commit of the following:

commit ea086e6a5be6780942c0a72d5b57dc4e4c4d6c97
Author: maya dagon <mdagon@cisco.com>
Date:   Wed Aug 16 07:49:32 2023 -0400

    http2_inspect: handle empty header name

src/service_inspectors/http2_inspect/http2_hpack.cc

index ddb3ab4a0768528a22789dbafa2e9bc9855b1074..6e28f40d71b22c84446f018717b22a2b6d893974 100644 (file)
@@ -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);