Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integer overflow tm2unixtime.c:480:50 #16050

Open
chongwick opened this issue Sep 25, 2024 · 0 comments
Open

integer overflow tm2unixtime.c:480:50 #16050

chongwick opened this issue Sep 25, 2024 · 0 comments

Comments

@chongwick
Copy link

Description

The following code:

<?php
$vars = array(
        "DateTime"                       => new DateTime(),);
$vars["DateTime"]->setTime(PHP_INT_MAX, 1, 2, PHP_FLOAT_MIN);
?>

Resulted in this output:

/home/dan/php-8.3.9/ext/date/lib/tm2unixtime.c:480:50: runtime error: signed integer overflow: 384307168202302316 * 43200 cannot be represented in type 'long long int'

PHP Version

8.3.9

Operating System

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants