mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Added check for small ZEMD_MM_SEG_SIZE
This commit is contained in:
parent
07586f682b
commit
9d4064afc0
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue