27 lines
728 B
Diff
27 lines
728 B
Diff
|
From ee0ec66ac2da159c0d215c9dbbe0ccc8333f51cc Mon Sep 17 00:00:00 2001
|
||
|
From: Jakub Wilk <jwilk@jwilk.net>
|
||
|
Date: Mon, 17 Jul 2017 11:04:25 +0200
|
||
|
Subject: [PATCH 03/12] Fix off-by-one buffer overflow in imphash()
|
||
|
|
||
|
The extra byte is needed for the terminating null byte.
|
||
|
---
|
||
|
src/pehash.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git src/pehash.c src/pehash.c
|
||
|
index ffb4fdd..59e15b0 100644
|
||
|
--- src/pehash.c
|
||
|
+++ src/pehash.c
|
||
|
@@ -488,7 +488,7 @@ static void imphash(pe_ctx_t *ctx, int flavor)
|
||
|
|
||
|
//puts(imphash_string); // DEBUG
|
||
|
|
||
|
- char imphash[32];
|
||
|
+ char imphash[33];
|
||
|
calc_hash("md5", (unsigned char *)imphash_string, strlen(imphash_string), imphash);
|
||
|
free(imphash_string);
|
||
|
|
||
|
--
|
||
|
2.26.2.672.g232c24e857
|
||
|
|