php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #55509
Patch bug55509.diff revision 2011-09-06 15:11 UTC by laruence@php.net
revision 2011-09-06 14:10 UTC by laruence@php.net
revision 2011-09-06 13:42 UTC by laruence@php.net
Patch bug55509.phpt revision 2011-09-06 14:01 UTC by laruence@php.net
revision 2011-09-06 13:50 UTC by laruence@php.net

Patch bug55509.diff for Reproducible crash Bug #55509

Patch version 2011-09-06 13:42 UTC

Return to Bug #55509 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions:

Developer: laruence@php.net

Index: trunk/Zend/zend_alloc.c
===================================================================
--- trunk/Zend/zend_alloc.c	(revision 316256)
+++ trunk/Zend/zend_alloc.c	(working copy)
@@ -515,7 +515,7 @@
 #define ZEND_MM_IS_GUARD_BLOCK(b)		(((b)->info._size & ZEND_MM_TYPE_MASK) == ZEND_MM_GUARD_BLOCK)
 
 #define ZEND_MM_NEXT_BLOCK(b)			ZEND_MM_BLOCK_AT(b, ZEND_MM_BLOCK_SIZE(b))
-#define ZEND_MM_PREV_BLOCK(b)			ZEND_MM_BLOCK_AT(b, -(int)((b)->info._prev & ~ZEND_MM_TYPE_MASK))
+#define ZEND_MM_PREV_BLOCK(b)			ZEND_MM_BLOCK_AT(b, -(size_t)((b)->info._prev & ~ZEND_MM_TYPE_MASK))
 
 #define ZEND_MM_PREV_BLOCK_IS_FREE(b)	(!((b)->info._prev & ZEND_MM_USED_BLOCK))
 
Index: branches/PHP_5_3/Zend/zend_alloc.c
===================================================================
--- branches/PHP_5_3/Zend/zend_alloc.c	(revision 316244)
+++ branches/PHP_5_3/Zend/zend_alloc.c	(working copy)
@@ -510,7 +510,7 @@
 #define ZEND_MM_IS_GUARD_BLOCK(b)		(((b)->info._size & ZEND_MM_TYPE_MASK) == ZEND_MM_GUARD_BLOCK)
 
 #define ZEND_MM_NEXT_BLOCK(b)			ZEND_MM_BLOCK_AT(b, ZEND_MM_BLOCK_SIZE(b))
-#define ZEND_MM_PREV_BLOCK(b)			ZEND_MM_BLOCK_AT(b, -(int)((b)->info._prev & ~ZEND_MM_TYPE_MASK))
+#define ZEND_MM_PREV_BLOCK(b)			ZEND_MM_BLOCK_AT(b, -(size_t)((b)->info._prev & ~ZEND_MM_TYPE_MASK))
 
 #define ZEND_MM_PREV_BLOCK_IS_FREE(b)	(!((b)->info._prev & ZEND_MM_USED_BLOCK))
 
Index: branches/PHP_5_4/Zend/zend_alloc.c
===================================================================
--- branches/PHP_5_4/Zend/zend_alloc.c	(revision 316244)
+++ branches/PHP_5_4/Zend/zend_alloc.c	(working copy)
@@ -515,7 +515,7 @@
 #define ZEND_MM_IS_GUARD_BLOCK(b)		(((b)->info._size & ZEND_MM_TYPE_MASK) == ZEND_MM_GUARD_BLOCK)
 
 #define ZEND_MM_NEXT_BLOCK(b)			ZEND_MM_BLOCK_AT(b, ZEND_MM_BLOCK_SIZE(b))
-#define ZEND_MM_PREV_BLOCK(b)			ZEND_MM_BLOCK_AT(b, -(int)((b)->info._prev & ~ZEND_MM_TYPE_MASK))
+#define ZEND_MM_PREV_BLOCK(b)			ZEND_MM_BLOCK_AT(b, -(size_t)((b)->info._prev & ~ZEND_MM_TYPE_MASK))
 
 #define ZEND_MM_PREV_BLOCK_IS_FREE(b)	(!((b)->info._prev & ZEND_MM_USED_BLOCK))
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 17:01:58 2014 UTC