Skip to content

Signed integer overflow in ext/calendar/gregor.c:161 #16235

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
jdtogregorian(92233658792494800);

Resulted in this output:

/php-src/ext/calendar/gregor.c:161:18: runtime error: signed integer overflow: -168963166 * 100 cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/ext/calendar/gregor.c:161:18 in 

PHP Version

PHP 8.4.0-dev

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