]> granicus.if.org Git - php/commitdiff
- MF52: calloc must actually clear the requested size (Andrei)
authorPierre Joye <pajoye@php.net>
Sun, 28 Jun 2009 09:48:48 +0000 (09:48 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 28 Jun 2009 09:48:48 +0000 (09:48 +0000)
Zend/zend_alloc.h

index a4d03d9749070a4e717fd6bf684655f39536d458..4462a80fb6693e6fad5211b17870633824994d96 100644 (file)
@@ -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;
 }