Skip to content

integer overflow in interval.c:312:11 #16975

Closed
@chongwick

Description

@chongwick

Description

The following code:

<?php
$datetime = new DateTime();
$datetime->setTimestamp(PHP_INT_MAX);

Resulted in this output:

/home/dan/php-src/ext/date/lib/interval.c:312:11: runtime error: signed integer overflow: 1 + 9223372036854775807 cannot be represented in type 'long long int'

PHP Version

8.4.1

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions