From: Michael Altizer (mialtize) Date: Wed, 30 May 2018 17:19:10 +0000 (-0400) Subject: Merge pull request #1243 in SNORT/snort3 from snort_fragbits to master X-Git-Tag: 3.0.0-246~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e0782026ab8257ebbb2080facc557e5d1f64d72;p=thirdparty%2Fsnort3.git Merge pull request #1243 in SNORT/snort3 from snort_fragbits to master Squashed commit of the following: commit 05748ac5ea77776efe6f84928ed7ba3a6bd710b9 Author: Cristian Date: Tue May 29 04:52:35 2018 -0400 ips_fragbits: Removed dead code --- diff --git a/src/ips_options/ips_fragbits.cc b/src/ips_options/ips_fragbits.cc index 5bc4488bf..e99322519 100644 --- a/src/ips_options/ips_fragbits.cc +++ b/src/ips_options/ips_fragbits.cc @@ -48,6 +48,8 @@ #include "config.h" #endif +#include + #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();