]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1243 in SNORT/snort3 from snort_fragbits to master
authorMichael Altizer (mialtize) <mialtize@cisco.com>
Wed, 30 May 2018 17:19:10 +0000 (13:19 -0400)
committerMichael Altizer (mialtize) <mialtize@cisco.com>
Wed, 30 May 2018 17:19:10 +0000 (13:19 -0400)
Squashed commit of the following:

commit 05748ac5ea77776efe6f84928ed7ba3a6bd710b9
Author: Cristian <candrone@cisco.com>
Date:   Tue May 29 04:52:35 2018 -0400

    ips_fragbits: Removed dead code

src/ips_options/ips_fragbits.cc

index 5bc4488bf1de6f3bc528a1ca74996141439436af..e993225196607af7dfe43d75912bba60d860c3ad 100644 (file)
@@ -48,6 +48,8 @@
 #include "config.h"
 #endif
 
+#include <cassert>
+
 #include "framework/ips_option.h"
 #include "framework/module.h"
 #include "hash/hashfcn.h"
@@ -210,18 +212,8 @@ bool FragBitsData::check_not(const uint16_t packet_fragbits)
 // parse fragbits and populate the information into this class
 void FragBitsData::parse_fragbits(const char* data)
 {
-    std::string bit_string;
-
-    // if its null the bit_string will stay empty
-    if(data)
-    {
-        bit_string = data;
-    }
-    else if ( bit_string.empty() )
-    {
-        ParseError("no arguments to the fragbits keyword");
-        return;
-    }
+    assert(data);
+    std::string bit_string = data;
 
     unsigned long len = bit_string.length();