[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/php/devel php-5.1.6-ecalloc.patch, NONE, 1.1 php.spec, 1.118, 1.119



Author: jorton

Update of /cvs/dist/rpms/php/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv10492

Modified Files:
	php.spec 
Added Files:
	php-5.1.6-ecalloc.patch 
Log Message:
* Wed Oct  4 2006 Joe Orton <jorton redhat com> 5.1.6-3
- from upstream: add safety checks against integer overflow in _ecalloc


php-5.1.6-ecalloc.patch:
 zend_alloc.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

--- NEW FILE php-5.1.6-ecalloc.patch ---
--- php-5.1.6/Zend/zend_alloc.c.ecalloc
+++ php-5.1.6/Zend/zend_alloc.c
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_alloc.c,v 1.144.2.4 2006/08/10 17:16:24 iliaa Exp $ */
+/* $Id: zend_alloc.c,v 1.144.2.5 2006/09/30 17:15:23 iliaa Exp $ */
 
 #include "zend.h"
 #include "zend_alloc.h"
@@ -328,15 +328,14 @@
 ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
 {
 	void *p;
-	int final_size = size*nmemb;
-	
+
 	HANDLE_BLOCK_INTERRUPTIONS();
-	p = _emalloc(final_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+	p = _safe_emalloc(nmemb, size, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
 	if (!p) {
 		HANDLE_UNBLOCK_INTERRUPTIONS();
 		return (void *) p;
 	}
-	memset(p, 0, final_size);
+	memset(p, 0, size * nmemb);
 	HANDLE_UNBLOCK_INTERRUPTIONS();
 	return p;
 }


Index: php.spec
===================================================================
RCS file: /cvs/dist/rpms/php/devel/php.spec,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -r1.118 -r1.119
--- php.spec	29 Aug 2006 17:21:27 -0000	1.118
+++ php.spec	4 Oct 2006 15:06:00 -0000	1.119
@@ -5,7 +5,7 @@
 Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
 Name: php
 Version: 5.1.6
-Release: 2
+Release: 3
 License: The PHP License v3.01
 Group: Development/Languages
 URL: http://www.php.net/
@@ -20,6 +20,7 @@
 Patch6: php-5.0.4-norpath.patch
 Patch7: php-4.3.2-libtool15.patch
 Patch13: php-5.0.2-phpize64.patch
+Patch14: php-5.1.6-ecalloc.patch
 
 # Fixes for extension modules
 Patch21: php-4.3.1-odbc.patch
@@ -293,6 +294,7 @@
 %patch6 -p1 -b .norpath
 %patch7 -p1 -b .libtool15
 %patch13 -p1 -b .phpize64
+%patch14 -p1 -b .ecalloc
 
 %patch21 -p1 -b .odbc
 %patch22 -p1 -b .shutdown
@@ -604,6 +606,9 @@
 %files pdo -f files.pdo
 
 %changelog
+* Wed Oct  4 2006 Joe Orton <jorton redhat com> 5.1.6-3
+- from upstream: add safety checks against integer overflow in _ecalloc
+
 * Tue Aug 29 2006 Joe Orton <jorton redhat com> 5.1.6-2
 - update to 5.1.6 (security fixes)
 - bump default memory_limit to 16M (#196802)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]