Closed
Description
Description
The following code:
<?php
unpack('h2147483647', str_repeat('X', 2**31 + 10));
?>
Resulted in this output:
/php-src/ext/standard/pack.c:981:36: runtime error: signed integer overflow: 1073741824 * 2 cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/ext/standard/pack.c:981:36 in
To reproduce:
php -d "memory_limit=-1" test.php
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04