Actions
Bug #1289
closedMPM b2gm matcher has questionable code
Affected Versions:
Effort:
Difficulty:
Label:
Description
The B2GM MPM matcher has questionable code related to use of B2gmPattern1 structures. These are only used for patterns of length 1.
The array ctx->patterns1 is of type uint8_t*, but are then always cast to B2gmPattern1 pointers. Why is patterns1 not of type (B2gmPattern1*)?
Offsets into the uint8_t array are started at 1 with a comment about skipping the first byte of the buffer. This will always result in unaligned access to the structure.
Actions