From: Pierre Joye Date: Sun, 28 Jun 2009 09:48:48 +0000 (+0000) Subject: - MF52: calloc must actually clear the requested size (Andrei) X-Git-Tag: php-5.3.0~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=25c47a252274c6525a42583fdaf5defbaa14b17d;p=php - MF52: calloc must actually clear the requested size (Andrei) --- diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index a4d03d9749..4462a80fb6 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -89,7 +89,7 @@ inline static void * __zend_malloc(size_t len) inline static void * __zend_calloc(size_t nmemb, size_t len) { void *tmp = _safe_malloc(nmemb, len, 0); - memset(tmp, 0, len); + memset(tmp, 0, nmemb * len); return tmp; }