From 25c47a252274c6525a42583fdaf5defbaa14b17d Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 28 Jun 2009 09:48:48 +0000 Subject: [PATCH] - MF52: calloc must actually clear the requested size (Andrei) --- Zend/zend_alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.40.0