[php-src] Issue #14780: Invalid range of representable values of type in ext/standard/fsock.c
| From: | YuanchengJiang | Date: | Wed, 03 Jul 2024 06:34:06 +0000 |
| Subject: | [php-src] Issue #14780: Invalid range of representable values of type in ext/standard/fsock.c | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247214@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/14780
Author: YuanchengJiang
### Description
The following code:
```php
<?php
$random_var=-9223372036854775808;
pfsockopen($random_var, $x, $random_var, $x, $random_var);
```
Resulted in this output:
```
/php-src/ext/standard/fsock.c:77:9: runtime error: -9.22337e+24 is outside the range of
representable values of type 'long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/ext/standard/fsock.c
```
(Unsure about the impact of "outside the range", let me know if you would like to ignore
such errors)
### PHP Version
PHP 8.4.0-dev
### Operating System
ubuntu 22.04