[Forensics-changes] [yara] 132/192: Fix bug in regexp engine introduced in recent changes.
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:31:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.6.0
in repository yara.
commit a378d26bca88cfd66490c457baa20f59978b7397
Author: plusvic <plusvic at gmail.com>
Date: Thu Mar 16 18:33:34 2017 +0100
Fix bug in regexp engine introduced in recent changes.
---
libyara/re.c | 2 +-
tests/test-rules.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/libyara/re.c b/libyara/re.c
index f17abe5..3d7bf9c 100644
--- a/libyara/re.c
+++ b/libyara/re.c
@@ -1756,7 +1756,7 @@ int _yr_re_fiber_sync(
FAIL_ON_ERROR(_yr_re_fiber_split(
fiber_list, fiber_pool, branch_a, &branch_b));
- if (opcode == RE_OPCODE_REPEAT_END_GREEDY)
+ if (opcode == RE_OPCODE_REPEAT_ANY_UNGREEDY)
yr_swap(branch_a, branch_b, RE_FIBER*);
branch_a->rc++;
diff --git a/tests/test-rules.c b/tests/test-rules.c
index f48b0b1..310ffd4 100644
--- a/tests/test-rules.c
+++ b/tests/test-rules.c
@@ -596,6 +596,12 @@ static void test_hex_strings()
condition: !a == 6 }",
"12111222");
+ assert_true_rule(
+ "rule test { \
+ strings: $a = {31 [0-3] (32|33)} \
+ condition: !a == 2 }",
+ "122222222");
+
assert_error(
"rule test { \
strings: $a = { 01 [0] 02 } \
--
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