detect/mpm: Improved handling of variable values

This commit removes the offset and depth if either of these values are
dependent upon a byte-extract operation.
pull/4393/head
Jeff Lucovsky 5 years ago committed by Victor Julien
parent 94982ae690
commit db8527e7b3

@ -736,6 +736,13 @@ static void PopulateMpmHelperAddPattern(MpmCtx *mpm_ctx,
}
}
/* We have to effectively "wild card" values that will be coming from
* byte_extract variables
*/
if (cd->flags & (DETECT_CONTENT_DEPTH_BE | DETECT_CONTENT_OFFSET_BE)) {
pat_depth = pat_offset = 0;
}
if (cd->flags & DETECT_CONTENT_NOCASE) {
if (chop) {
MpmAddPatternCI(mpm_ctx,

Loading…
Cancel
Save