Skip to content

Signed integer overflow in cal_from_jd #16834

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$doubles = array(
076545676543223,
);
foreach ($doubles as $d) {
}
$fusion = $d;
var_dump(cal_from_jd($fusion, CAL_GREGORIAN));

Resulted in this output:

/php-src/ext/calendar/gregor.c:165:18: runtime error: signed integer overflow: 117966567 * 100 cannot be represented in type 'int'

PHP Version

nightly

Operating System

ubuntu 22.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions