[Forensics-changes] [yara] 265/415: Fix issue #96
Hilko Bengen
bengen at moszumanska.debian.org
Thu Apr 3 05:43:13 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch debian
in repository yara.
commit 2d96fdf13448f07299bdd2d608827b0b385bf18d
Author: Victor M. Alvarez <vmalvarez at virustotal.com>
Date: Fri Nov 29 18:07:53 2013 +0100
Fix issue #96
---
libyara/grammar.y | 3 +++
yara-python/tests.py | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/libyara/grammar.y b/libyara/grammar.y
index a422580..ccc1375 100644
--- a/libyara/grammar.y
+++ b/libyara/grammar.y
@@ -1194,6 +1194,9 @@ TERM* reduce_string_enumeration( yyscan_t yyscanner,
YARA_CONTEXT* context = yyget_extra(yyscanner);
TERM_STRING* term = (TERM_STRING*) string_identifier;
+ while (term->next != NULL)
+ term = term->next;
+
term->next = (TERM_STRING*) string_list_head;
term->string->flags |= STRING_FLAGS_REFERENCED;
diff --git a/yara-python/tests.py b/yara-python/tests.py
index e7b682f..c1673ca 100644
--- a/yara-python/tests.py
+++ b/yara-python/tests.py
@@ -159,7 +159,8 @@ class TestYara(unittest.TestCase):
self.assertTrueRules([
'rule test { strings: $a = "ssi" $b = "mis" $c = "oops" condition: any of them }',
'rule test { strings: $a = "ssi" $b = "mis" $c = "oops" condition: 1 of them }',
- 'rule test { strings: $a = "ssi" $b = "mis" $c = "oops" condition: 2 of them }'
+ 'rule test { strings: $a = "ssi" $b = "mis" $c = "oops" condition: 2 of them }',
+ 'rule test { strings: $a1 = "dummy1" $b1 = "dummy1" $b2 = "ssi" condition: any of ($a*, $b*) }',
], 'mississipi')
self.assertFalseRules([
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list