summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2009-06-28 09:47:42 +0000
committerPierre Joye <pajoye@php.net>2009-06-28 09:47:42 +0000
commit0f79478716cb41d505ccb51c22e1d91ceadeb18b (patch)
tree2e6b9e1c30f54682079e828d1cfa6a095ea27cc0
parentec1d2c8dc9809389951022a823481d3aec051689 (diff)
downloadphp-git-0f79478716cb41d505ccb51c22e1d91ceadeb18b.tar.gz
- calloc must actually clearing 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 3bd75314a9..679e0e52e1 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;
}