Due to how the Recursive() YARA compiler function was organized, it would continue to parse YARA files after the error, resulting in panics or the baffling error message:
yara-rules-full.yar: Compiler cannot be used after parse error"
This now returns the first error encountered, for example:
failed to parse ref/words/ssh_attack.yara: duplicated string identifier \"$ref2\"
With any luck, we won't need the panic handler any longer, so it's been removed.
Due to how the
Recursive()
YARA compiler function was organized, it would continue to parse YARA files after the error, resulting in panics or the baffling error message:yara-rules-full.yar: Compiler cannot be used after parse error"
This now returns the first error encountered, for example:
failed to parse ref/words/ssh_attack.yara: duplicated string identifier \"$ref2\"
With any luck, we won't need the panic handler any longer, so it's been removed.