cvs: ZendEngine2(PHP_5_2) / zend_alloc.c
| From: | Dmitry Stogov | Date: | Mon, 21 Jul 2008 17:06:55 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_2) / zend_alloc.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-6908@lists.php.net to get a copy of this message | ||
dmitry Mon Jul 21 17:06:55 2008 UTC
Modified files: (Branch: PHP_5_2)
/ZendEngine2 zend_alloc.c
Log:
Added check for small ZEMD_MM_SEG_SIZE
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_alloc.c?r1=1.144.2.3.2.48&r2=1.144.2.3.2.49&diff_format=u
Index: ZendEngine2/zend_alloc.c
diff -u ZendEngine2/zend_alloc.c:1.144.2.3.2.48 ZendEngine2/zend_alloc.c:1.144.2.3.2.49
--- ZendEngine2/zend_alloc.c:1.144.2.3.2.48 Sun May 11 11:47:01 2008
+++ ZendEngine2/zend_alloc.c Mon Jul 21 17:06:55 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.c,v 1.144.2.3.2.48 2008/05/11 11:47:01 mattwil Exp $ */
+/* $Id: zend_alloc.c,v 1.144.2.3.2.49 2008/07/21 17:06:55 dmitry Exp $ */
#include "zend.h"
#include "zend_alloc.h"
@@ -1117,6 +1117,9 @@
if (zend_mm_low_bit(seg_size) != zend_mm_high_bit(seg_size)) {
fprintf(stderr, "ZEND_MM_SEG_SIZE must be a power of two\n");
exit(255);
+ } else if (seg_size < ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE) {
+ fprintf(stderr, "ZEND_MM_SEG_SIZE is too small\n");
+ exit(255);
}
} else {
seg_size = ZEND_MM_SEG_SIZE;