summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2009-06-28 09:48:48 +0000
committerPierre Joye <pajoye@php.net>2009-06-28 09:48:48 +0000
commit25c47a252274c6525a42583fdaf5defbaa14b17d (patch)
tree229a37d5fff5b010274666d360adff0f421bac80
parentc3003002f7e15e9c63f07552922191919f740647 (diff)
downloadphp-git-25c47a252274c6525a42583fdaf5defbaa14b17d.tar.gz
- MF52: calloc must actually clear the requested size (Andrei)
-rw-r--r--Zend/zend_alloc.h2
1 files changed, 1 insertions, 1 deletions
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;
}