[Forensics-changes] [yara] 106/407: Fix a copy/paste mistake in richhash.
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:28:15 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.3.0
in repository yara.
commit 77ad1e7d03fd9919ad3e1d877c7f156c9646e5fc
Author: Wesley Shields <wxs at atarininja.org>
Date: Tue Oct 14 10:49:52 2014 -0400
Fix a copy/paste mistake in richhash.
While here, don't use hardcoded numbers. Use the macros.
---
libyara/modules/pe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libyara/modules/pe.c b/libyara/modules/pe.c
index 320d1ab..7feeb44 100644
--- a/libyara/modules/pe.c
+++ b/libyara/modules/pe.c
@@ -2643,7 +2643,7 @@ define_function(imphash)
sprintf(digest_ascii + (i * 2), "%02x", digest[i]);
}
- digest_ascii[32] = '\0';
+ digest_ascii[SHA256_DIGEST_LENGTH * 2] = '\0';
return_string(digest_ascii);
}
@@ -2672,7 +2672,7 @@ define_function(richhash)
sprintf(digest_ascii + (i * 2), "%02x", digest[i]);
}
- digest_ascii[32] = '\0';
+ digest_ascii[MD5_DIGEST_LENGTH * 2] = '\0';
return_string(digest_ascii);
}
--
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