Files
Valerie Snyder fcf8134aab Fix: Reject repeated AC replacement heads
The repeated-prefix selector ranked candidate windows by occurrences of
the original repeated byte. A signature such as ffffff000000 could
therefore replace an ff trie head with an all-zero trie head and recreate
the low-selectivity behavior this optimization is intended to avoid.

Require shifted windows to contain at least two distinct bytes. Add a
matcher regression that verifies the transition window is selected and
that the complete signature still matches.

Validation:

- make -j12 check_clamav
- CK_RUN_CASE=matchers ./build/unit_tests/check_clamav
- git clang-format --diff HEAD -- libclamav/matcher-ac.c
  unit_tests/check_matchers.c
2026-08-21 16:40:34 -04:00
..