Merge in SNORT/snort3 from ~YVELYKOZ/snort3:sse_negation_handling to master
Squashed commit of the following:
commit
5c65144c0dc2126e58aecd2148ac2c09d3645bbd
Author: Yehor Velykozhon <yvelykoz@cisco.com>
Date: Thu Nov 17 18:52:18 2022 +0200
ips_option: keep cursor intact for a negated hash mismatched
commit
02eb93f9bfea0bf4d657de2aa3b94a714f4cdc52
Author: Yehor Velykozhon <yvelykoz@cisco.com>
Date: Thu Nov 17 17:12:37 2022 +0200
ips_option: keep cursor intact for a negated content mismatched
if ( found >= 0 )
{
- c.set_delta(c.get_delta() + found + cd->match_delta);
- c.set_pos(pos + found + cd->pmd.pattern_size);
+ if ( !cd->pmd.is_negated() )
+ {
+ c.set_delta(c.get_delta() + found + cd->match_delta);
+ c.set_pos(pos + found + cd->pmd.pattern_size);
+ }
return 1;
}
if ( !found )
{
- c.set_pos(pos + config->length);
+ if ( !config->negated )
+ c.set_pos(pos + config->length);
+
return 1;
}