Skip to content

integer overflow tm2unixtime.c:480:50 #16050

Closed
@chongwick

Description

@chongwick

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions