mpm/ac: fix PID mask in SCACSearch u32 branch

Lookup code used a different mask than the construct code.

Ticket: #8820.
pull/16148/head
Victor Julien 1 month ago
parent c3b9cad5dd
commit 8e493e2d6c

@ -920,7 +920,7 @@ uint32_t SCACSearch(const MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx,
const uint32_t *pids = ctx->output_table[state & 0x00FFFFFF].pids; const uint32_t *pids = ctx->output_table[state & 0x00FFFFFF].pids;
for (uint32_t k = 0; k < no_of_entries; k++) { for (uint32_t k = 0; k < no_of_entries; k++) {
if (pids[k] & AC_CASE_MASK) { if (pids[k] & AC_CASE_MASK) {
const uint32_t lower_pid = pids[k] & 0x0000FFFF; const uint32_t lower_pid = pids[k] & AC_PID_MASK;
const SCACPatternList *pat = &pid_pat_list[lower_pid]; const SCACPatternList *pat = &pid_pat_list[lower_pid];
const int offset = i - pat->patlen + 1; const int offset = i - pat->patlen + 1;

Loading…
Cancel
Save