[Forensics-changes] [yara] 232/415: Fix buffer overflow issues in _yr_scan_fast_hex_re_exec

Hilko Bengen bengen at moszumanska.debian.org
Thu Apr 3 05:43:09 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 619831cb88558bd99c8100ad2ee33697435a1118
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Wed Nov 20 23:55:10 2013 +0000

    Fix buffer overflow issues in _yr_scan_fast_hex_re_exec
---
 libyara/rules.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/libyara/rules.c b/libyara/rules.c
index a5aa9bc..c2dfd00 100644
--- a/libyara/rules.c
+++ b/libyara/rules.c
@@ -178,6 +178,17 @@ int _yr_scan_fast_hex_re_exec(
 
     while(!stop)
     {
+      if (flags & RE_FLAGS_BACKWARDS)
+      {
+        if (current_input <= input - input_size)
+          break;
+      }
+      else
+      {
+        if (current_input >= input + input_size)
+          break;
+      }
+
       switch(*ip)
       {
         case RE_OPCODE_LITERAL:

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