[Forensics-changes] [yara] 113/368: Check for full stack in _yr_scan_fast_hex_re_exec

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:30:18 UTC 2017


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag v3.5.0
in repository yara.

commit a02c0235aa31a3b913bdd4ba935c3a73e00e6cbb
Author: Victor Manuel Alvarez <vmalvarez at virustotal.com>
Date:   Wed Nov 11 19:12:40 2015 +0100

    Check for full stack in _yr_scan_fast_hex_re_exec
---
 libyara/scan.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libyara/scan.c b/libyara/scan.c
index 9817f6a..a6a684e 100644
--- a/libyara/scan.c
+++ b/libyara/scan.c
@@ -293,6 +293,9 @@ int _yr_scan_fast_hex_re_exec(
           //
           // The opcode following the ANY is located at ip + 4
 
+          if (sp >= MAX_FAST_HEX_RE_STACK)
+            return -4;
+
           code_stack[sp] = ip + 4;
           input_stack[sp] = current_input;
           matches_stack[sp] = matches;

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