Skip to content

Commit b8cba88

Browse files
committed
Suppress overflow UB in zend_strtod
1 parent 555d68b commit b8cba88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_strtod.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2705,7 +2705,7 @@ zend_strtod
27052705
L = c - '0';
27062706
s1 = s;
27072707
while((c = *++s) >= '0' && c <= '9')
2708-
L = 10*L + (c - '0');
2708+
L = (Long) (10*(ULong)L + (c - '0'));
27092709
if (s - s1 > 8 || L > 19999)
27102710
/* Avoid confusion from exponents
27112711
* so large that e might overflow.

0 commit comments

Comments
 (0)