[php-src] Issue #15712: Out of int range in Zend/zend_strtod.c
| From: | YuanchengJiang | Date: | Mon, 02 Sep 2024 11:30:14 +0000 |
| Subject: | [php-src] Issue #15712: Out of int range in Zend/zend_strtod.c | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247679@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15712
Author: YuanchengJiang
### Description
The following code:
```php
<?php
ini_set('precision', 1140973389);
echo "len=", strlen(strval(-1 * pow(2, -10))), "\n";
?>
```
Resulted in this output:
```
/php-src/Zend/zend_strtod.c:3617:5: runtime error: left shift of 1073741824 by 1 places cannot be
represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/Zend/zend_strtod.c:3617:5
```
### PHP Version
PHP 8.4.0-dev
### Operating System
ubuntu 22.04