[Forensics-changes] [yara] 91/415: RE2 defaults to assuming patterns are UTF-8 strings, this breaks alot of patterns that look for raw bytes. So let's use Latin1 instead, so that doesn't happen.

Hilko Bengen bengen at moszumanska.debian.org
Thu Apr 3 05:42:49 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 3f34ab3343a1e1638f8e694810719bd48fdaaf45
Author: Mike Wiacek <mjwiacek at google.com>
Date:   Thu Mar 24 19:52:00 2011 +0000

    RE2 defaults to assuming patterns are UTF-8 strings, this breaks alot
    of patterns that look for raw bytes. So let's use Latin1 instead, so
    that doesn't happen.
---
 libyara/regex/regex-re2.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libyara/regex/regex-re2.cc b/libyara/regex/regex-re2.cc
index 9c4f316..ffe1db6 100644
--- a/libyara/regex/regex-re2.cc
+++ b/libyara/regex/regex-re2.cc
@@ -71,6 +71,7 @@ int regex_compile(REGEXP* output,
 
     RE2::Options options;
     options.set_log_errors(false);
+    options.set_encoding(RE2::Options::EncodingLatin1);
 
     if (case_insensitive)
         options.set_case_sensitive(false);

-- 
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