fix: assign yara_strings/yara_condition to empty string when Some has cmin=0 to prevent UnboundLocalError

This commit is contained in:
Willi Ballenthin
2026-04-22 22:16:41 +03:00
committed by Willi Ballenthin
parent ae4c2ec82d
commit e474e477f1
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -512,6 +512,8 @@ def convert_rule(rule, rulename, cround, depth):
if not cmin:
logger.info("this is optional: which means, we can just ignore it")
yara_strings = ""
yara_condition = ""
else:
# this is "x or more". could be coded for strings TODO
return "BREAK", "Some aka x or more (TODO)", rule_comment, incomplete