]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/byte-math: Support multiplication operator
authorJeff Lucovsky <jlucovsky@oisf.net>
Thu, 18 May 2023 12:53:59 +0000 (08:53 -0400)
committerVictor Julien <vjulien@oisf.net>
Tue, 13 Jun 2023 17:27:54 +0000 (19:27 +0200)
Issue: 6070

This commit adds support for the multiplication operator to byte-math.
The regex for parsing the keyword options was missing the `*` character.

src/detect-bytemath.c

index 5acd354c136668e2c9f9ddc09fde73463029b591..164384a0ea7875bc9672cd9b1b9f53f1a129b758 100644 (file)
@@ -76,7 +76,7 @@
     "^"                                                                                            \
     "\\s*(bytes)\\s*(\\d+)\\s*"                                                                    \
     ",\\s*(offset)\\s*([-]?\\d+)\\s*"                                                              \
-    ",\\s*(oper)\\s*([-+\\/]{1}|<<|>>)\\s*"                                                        \
+    ",\\s*(oper)\\s*([-+\\/\\*]{1}|<<|>>)\\s*"                                                     \
     ",\\s*(rvalue)\\s*(\\w+)\\s*"                                                                  \
     ",\\s*(result)\\s*(\\w+)\\s*"                                                                  \
     "(?:,\\s*(relative)\\s*)?"                                                                     \