cvs: ZendEngine2 / zend_alloc.c

"Dmitry Stogov" <[email protected]>
Newsgroups gmane.comp.php.cvs.zend
Message-ID <cvsdmitry1216659976@cvsserver>
dmitry		Mon Jul 21 17:06:16 2008 UTC

  Modified files:              
    /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.213&r2=1.214&diff_format=u
Index: ZendEngine2/zend_alloc.c
diff -u ZendEngine2/zend_alloc.c:1.213 ZendEngine2/zend_alloc.c:1.214
--- ZendEngine2/zend_alloc.c:1.213	Sun May 11 11:45:31 2008
+++ ZendEngine2/zend_alloc.c	Mon Jul 21 17:06:16 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_alloc.c,v 1.213 2008/05/11 11:45:31 mattwil Exp $ */
+/* $Id: zend_alloc.c,v 1.214 2008/07/21 17:06:16 dmitry Exp $ */
 
 #include "zend.h"
 #include "zend_alloc.h"
@@ -1153,6 +1153,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;



-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.