[Forensics-changes] [yara] 119/415: Bug fix: Integer overflow causing infinite loop in hex_match (issue 35)

Hilko Bengen bengen at moszumanska.debian.org
Thu Apr 3 05:42:52 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 3e91e530f7663490d3c33410d0973fa7b760b1c6
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Tue Jan 31 15:15:59 2012 +0000

    Bug fix: Integer overflow causing infinite loop in hex_match (issue 35)
---
 libyara/scan.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libyara/scan.c b/libyara/scan.c
index ea04153..56eb578 100644
--- a/libyara/scan.c
+++ b/libyara/scan.c
@@ -191,14 +191,13 @@ inline int wicompare(char* str1, char* str2, int len)
 int hex_match(unsigned char* buffer, size_t buffer_size, unsigned char* pattern, int pattern_length, unsigned char* mask)
 {
 	size_t b,p,m;
-	unsigned char i;
 	unsigned char distance;
 	unsigned char delta;
     int match;
     int match_length;
     int longest_match;
 	int matches;
-    int tmp, tmp_b;
+    int i, tmp, tmp_b;
 	
 	b = 0;
 	p = 0;

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