mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2026-05-03 05:07:13 -04:00
In 0.104 and prior, the function for adding a logical subsignature was being used for NDB sigs, FTM, sigs, *and* Yara strings. When cleaning up the logic for handling different types of logical sig subsignatures, we accidentally broke support for regex strings in yara rules. This commit adds new logic for recording if the Yara string is a regex string, by adding a regex subsig opt. Then in a new function for adding different types of Yara strings, we check if it's a regex string or not before adding as either a PCRE pattern or as an AC/BM pattern. Resolves: https://github.com/Cisco-Talos/clamav/issues/494 Also add a basic test for yara regex rule.