[php-src] Issue #16034: overflow in tm2unixtime
| From: | chongwick | Date: | Wed, 25 Sep 2024 00:27:41 +0000 |
| Subject: | [php-src] Issue #16034: overflow in tm2unixtime | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247888@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/16034
Author: chongwick
### Description
The following code:
```php
<?php
$a = PHP_INT_MIN;
$b = PHP_FLOAT_MIN;
$c = date('Y-m-d H:i:s', gmmktime($a, $a, $a, $a, $a, $a));
echo $c;
?>
```
Resulted in this output:
```
/home/dan/php-8.3.9/ext/date/lib/tm2unixtime.c:39:6: runtime error: signed integer overflow:
-9223372036854775808 - 153722867280912931 cannot be represented in type 'long long int'
```
### PHP Version
8.3.9
### Operating System
_No response_