[Forensics-changes]  [yara] 267/415: Fix bug causing regular expressions marked both as “wide” and “ascii” to be tried only as “wide”
    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 42ebd3676b0405f6aa3c912b81c20a4e2c1c599f
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Fri Nov 29 22:05:02 2013 +0100
    Fix bug causing regular expressions marked both as “wide” and “ascii” to be tried only as “wide”
---
 libyara/scan.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libyara/scan.c b/libyara/scan.c
index deda8d7..300e944 100644
--- a/libyara/scan.c
+++ b/libyara/scan.c
@@ -692,11 +692,13 @@ inline int string_match(unsigned char* buffer, size_t buffer_size, STRING* strin
                     yr_free(tmp);
                 }
 
-                return match * 2;
+                if (match > 0)
+                    return match * 2;
             }
 
         }
-        else
+
+        if (IS_ASCII(string))
         {
             return regexp_match(buffer, buffer_size, string->string, string->length, string->re, negative_size);
         }
-- 
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