We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ea0937b + eb46022 commit 81d580eCopy full SHA for 81d580e
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
@@ -3609,11 +3609,11 @@ rv_alloc(i) int i;
3609
rv_alloc(int i)
3610
#endif
3611
{
3612
- int j, k, *r;
+ int k, *r;
3613
3614
- j = sizeof(ULong);
+ size_t j = sizeof(ULong);
3615
for(k = 0;
3616
- sizeof(Bigint) - sizeof(ULong) - sizeof(int) + (size_t)j <= (size_t)i;
+ sizeof(Bigint) - sizeof(ULong) - sizeof(int) + j <= (size_t)i;
3617
j <<= 1)
3618
k++;
3619
r = (int*)Balloc(k);
0 commit comments