]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1987 in SNORT/snort3 from ~THOPETER/snort3:nhttp132 to master
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Fri, 7 Feb 2020 15:53:19 +0000 (15:53 +0000)
committerMike Stepanek (mstepane) <mstepane@cisco.com>
Fri, 7 Feb 2020 15:53:19 +0000 (15:53 +0000)
Squashed commit of the following:

commit fcc1bd432f77302b8e39012725841b813abb7ca1
Author: Tom Peters <thopeter@cisco.com>
Date:   Tue Feb 4 15:50:27 2020 -0500

    http_inspect: gzip splitting fix

src/service_inspectors/http_inspect/http_enum.h
src/service_inspectors/http_inspect/http_msg_section.cc

index 40719bdda2883715278ef0cae7ec1a33cc6f7782..ed61be7463c58141ad144c3bcab92bcc03110a58 100644 (file)
@@ -27,6 +27,7 @@ namespace HttpEnums
 static const int MAX_OCTETS = 63780;
 static const int GZIP_BLOCK_SIZE = 2048;
 static const int MAX_SECTION_STRETCH = 1460;
+static const int MIN_FILE_BLOCK_SIZE = 1;
 
 static const uint32_t HTTP_GID = 119;
 static const int GZIP_WINDOW_BITS = 31;
index 1fab8dfc69662c354e64399fdd173a422060579b..5aca2b809e745ec4964adfe77c022beeac37d13f 100644 (file)
@@ -101,8 +101,8 @@ void HttpMsgSection::update_depth() const
         }
         else
         {
-            // Just for file processing
-            session_data->section_size_target[source_id] = SnortConfig::get_conf()->max_pdu;
+            // Just for file processing. Split on packet boundaries.
+            session_data->section_size_target[source_id] = MIN_FILE_BLOCK_SIZE;
             session_data->stretch_section_to_packet[source_id] = true;
         }
         return;