From: Russ Combs Date: Tue, 4 Nov 2014 20:55:21 +0000 (-0500) Subject: fixed boyer-moore init and removed content byte extract var cruft X-Git-Tag: 3.0.0-233~1269 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a608cfcf75d40a3193ef78c6f145edb6bfa69f44;p=thirdparty%2Fsnort3.git fixed boyer-moore init and removed content byte extract var cruft --- diff --git a/ChangeLog b/ChangeLog index 15cbdbcd9..95f95f27a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,8 @@ -- added comment for binder bug -- fixed non-paf splitter init -- fixed splitter update calls +-- fixed boyer-moore init +-- removed content extract var cruft 126 -- pulled latest from tom diff --git a/src/ips_options/ips_content.cc b/src/ips_options/ips_content.cc index 5a9464dd6..36c4132bd 100644 --- a/src/ips_options/ips_content.cc +++ b/src/ips_options/ips_content.cc @@ -525,10 +525,7 @@ static void parse_content(PatternMatchData* ds_idx, const char* rule) memcpy(ds_idx->pattern_buf, tmp_buf, dummy_size); ds_idx->pattern_size = dummy_size; - - make_precomp(ds_idx); ds_idx->negated = negated; - ds_idx->match_delta = GetMaxJumpSize(ds_idx->pattern_buf, ds_idx->pattern_size); } @@ -774,8 +771,9 @@ bool ContentModule::end(const char*, int, SnortConfig*) if ( pmd->no_case ) { for ( unsigned i = 0; i < pmd->pattern_size; i++ ) - pmd->pattern_buf[i] = toupper((int)pmd->pattern_buf[i]); + pmd->pattern_buf[i] = toupper(pmd->pattern_buf[i]); } + make_precomp(pmd); return true; } diff --git a/src/ips_options/ips_content.h b/src/ips_options/ips_content.h index a96aa3332..9337b0dd5 100644 --- a/src/ips_options/ips_content.h +++ b/src/ips_options/ips_content.h @@ -45,8 +45,6 @@ struct PatternMatchData int8_t offset_var; /* byte_extract variable indices for offset, */ int8_t depth_var; /* depth, distance, within */ - int8_t distance_var; - int8_t within_var; int no_case; /* Toggle case sensitivity */ int relative; /* do relative pattern searching */