Commit Graph

13 Commits (2ddd26446e3a568074650cf16ec4ad8402acdcd4)

Author SHA1 Message Date
Philippe Antoine 473ca6dcf4 detect: bytemath do not left shift more than 64
As it is undefined behavior by C standard.
In this case, zeroes the value.

Ticket: #5900
4 years ago
Victor Julien b31ffde6f4 output: remove error codes from output 4 years ago
Philippe Antoine ad713246a9 src: remove double includes
Keep the unconditional include to be sure it works

git grep '#include "' src/*.c | sort | uniq -c | awk '$1 > 1'
4 years ago
Philippe Antoine 1f066cbbe8 unittest: fix unneeded includes as per cppclean
Especially because there is conditional inclusion from a header
4 years ago
Jeff Lucovsky ccd1063e43 detect/bytemath: convert parser to Rust
Issue: 5077

This commit
- Converts the PCRE based parser to Rust.
- Adds unit tests to the new Rust modules
- Removes the PCRE parser from detect-bytemath.c
- Adjusts the C source modules to refer to the Rust definitions
- Includes the multiply operator (missing from the C parser)
4 years ago
Philippe Antoine 02f2602dde src: rework includes as per cppclean 4 years ago
Philippe Antoine 56f664af6b pcre2: follow code naming style 5 years ago
Philippe Antoine 48dd0cf804 pcre2: check for PCRE2_ERROR_UNSET
Needs maybe to be generalized
5 years ago
Philippe Antoine 3de99a214c pcre2: migrate keywords parsing 5 years ago
Philippe Antoine 2b043150ed detect: initializes memory in bytemath parsing 6 years ago
Jeff Lucovsky 828bf6d1d6 detect: Treat offset as a signed value
This commit updates the detector to treat 'offset' as a signed value to
be compatible with Snort.
6 years ago
Victor Julien 6ab323d323 detect: hide RegisterTests behind ifdef UNITTESTS
Update all callers to more aggressively use UNITTESTS guards as well.
6 years ago
Jeff Lucovsky 0e4ba7b13e detect: Add byte_math detector 6 years ago