[Forensics-changes] [yara] 53/407: Use calloc() instead of malloc().
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:28:09 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 1c8b82e7390dec67aaeb219dfe6961f11e375833
Author: Wesley Shields <wxs at atarininja.org>
Date: Tue Sep 23 22:21:42 2014 -0400
Use calloc() instead of malloc().
This is needed to ensure the structures I use to track imports are
properly zero'ed.
---
libyara/mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libyara/mem.c b/libyara/mem.c
index e7664a2..78f5347 100644
--- a/libyara/mem.c
+++ b/libyara/mem.c
@@ -96,7 +96,7 @@ int yr_heap_free()
void* yr_malloc(size_t size)
{
- return malloc(size);
+ return calloc(1, size);
}
--
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