|
From: <sv...@va...> - 2013-09-16 21:46:38
|
Author: florian
Date: Mon Sep 16 21:46:31 2013
New Revision: 13556
Log:
VG_(memset) cannot handle NULL pointers and needs to be guarded.
Modified:
trunk/coregrind/m_mallocfree.c
Modified: trunk/coregrind/m_mallocfree.c
==============================================================================
--- trunk/coregrind/m_mallocfree.c (original)
+++ trunk/coregrind/m_mallocfree.c Mon Sep 16 21:46:31 2013
@@ -2200,7 +2200,8 @@
p = VG_(arena_malloc) ( aid, cc, size );
- VG_(memset)(p, 0, size);
+ if (p != NULL)
+ VG_(memset)(p, 0, size);
return p;
}
|