From 875a9dc4c4a61131420f17c32636800b574776c1 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 8 Nov 2024 04:09:13 +0000 Subject: [PATCH] Fix introduced leaks from GH-15715. Choosing here to shrink the requested allocation to its max value. --- Zend/zend_strtod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c index 38caef0b10f..634db19e792 100644 --- a/Zend/zend_strtod.c +++ b/Zend/zend_strtod.c @@ -3622,7 +3622,7 @@ rv_alloc(int i) j = sizeof(ULong); if (i > ((INT_MAX >> 2) + rem)) - zend_error_noreturn(E_ERROR, "rv_alloc() allocation overflow %d", i); + i = (INT_MAX >> 2) + rem; for(k = 0; rem + j <= (size_t)i; j <<= 1) k++;