cvs: ZendEngine2(PHP_5_3) / zend_alloc.h
pajoye Sun Jun 28 09:48:48 2009 UTC
Modified files: (Branch: PHP_5_3)
/ZendEngine2 zend_alloc.h
Log:
- MF52: calloc must actually clear the requested size (Andrei)
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_alloc.h?r1=1.63.2.2.2.12.2.9&r2=1.63.2.2.2.12.2.10&diff_format=u
Index: ZendEngine2/zend_alloc.h
diff -u ZendEngine2/zend_alloc.h:1.63.2.2.2.12.2.9 ZendEngine2/zend_alloc.h:1.63.2.2.2.12.2.10
--- ZendEngine2/zend_alloc.h:1.63.2.2.2.12.2.9 Sun Jan 25 13:41:50 2009
+++ ZendEngine2/zend_alloc.h Sun Jun 28 09:48:48 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.h,v 1.63.2.2.2.12.2.9 2009/01/25 13:41:50 dsp Exp $ */
+/* $Id: zend_alloc.h,v 1.63.2.2.2.12.2.10 2009/06/28 09:48:48 pajoye Exp $ */
#ifndef ZEND_ALLOC_H
#define ZEND_ALLOC_H
@@ -89,7 +89,7 @@
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;
}
Thread (1 message)
- Pierre-Alain Joye