We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b975b6c + 503d914 commit eb46022Copy full SHA for eb46022
Zend/tests/gh15712.phpt
@@ -0,0 +1,9 @@
1
+--TEST--
2
+GH-15712: overflow on real number printing
3
+--FILE--
4
+<?php
5
+ini_set('precision', 1100000000);
6
+echo -1 * (2 ** -10);
7
+?>
8
+--EXPECTF--
9
+%s
Zend/zend_strtod.c
@@ -3613,11 +3613,11 @@ rv_alloc(i) int i;
3613
rv_alloc(int i)
3614
#endif
3615
{
3616
- int j, k, *r;
+ int k, *r;
3617
3618
- j = sizeof(ULong);
+ size_t j = sizeof(ULong);
3619
for(k = 0;
3620
- sizeof(Bigint) - sizeof(ULong) - sizeof(int) + (size_t)j <= (size_t)i;
+ sizeof(Bigint) - sizeof(ULong) - sizeof(int) + j <= (size_t)i;
3621
j <<= 1)
3622
k++;
3623
r = (int*)Balloc(k);
0 commit comments