summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_alloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 4225c1754a..856abc6711 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -1125,6 +1125,9 @@ ZEND_API zend_mm_heap *zend_mm_startup(void)
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;