summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--Zend/zend_alloc.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 87dbe17740..b04045831b 100644
--- a/NEWS
+++ b/NEWS
@@ -58,6 +58,7 @@ PHP NEWS
- Fixed bug #39652 (Wrong negative results from memeory_get_usage()). (Dmitry)
- Fixed bug #39648 (Implementation of PHP functions chown() and chgrp() are not
thread safe). (Ilia, wharmby at uk dot ibm dot com)
+- Fixed bug #39640 (Segfault with "Allowed memory size exhausted"). (Dmitry)
- Fixed bug #39623 (thread safety fixes on *nix for putenv() & mime_magic).
(Ilia, wharmby at uk dot ibm dot com)
- Fixed bug #39621 (str_replace() is not binary safe on strings with equal
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index ede2c94bcc..1166008099 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -438,7 +438,7 @@ static long _mem_block_end_magic = MEM_BLOCK_END_MAGIC;
#else
-# define ZEND_MM_VALID_PTR(ptr) 1
+# define ZEND_MM_VALID_PTR(ptr) (ptr != NULL)
# define ZEND_MM_SET_MAGIC(block, val)