Skip to content

Commit

Permalink
Merge branch 'PHP-8.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Nov 7, 2024
2 parents 93c9c7c + 7477c1b commit 600da8c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Zend/zend_strtod.c
Original file line number Diff line number Diff line change
Expand Up @@ -3605,13 +3605,20 @@ rv_alloc(i) int i;
rv_alloc(int i)
#endif
{
int k, *r;

size_t j = sizeof(ULong);
int j, k, *r;
size_t rem;

rem = sizeof(Bigint) - sizeof(ULong) - sizeof(int);


j = sizeof(ULong);
if (i > ((INT_MAX >> 2) + rem))
zend_error_noreturn(E_ERROR, "rv_alloc() allocation overflow %d", i);
for(k = 0;
sizeof(Bigint) - sizeof(ULong) - sizeof(int) + j <= (size_t)i;
j <<= 1)
rem + j <= (size_t)i; j <<= 1)
k++;

r = (int*)Balloc(k);
*r = k;
return
Expand Down

0 comments on commit 600da8c

Please sign in to comment.