Skip to content

Conversation

@nielsdos
Copy link
Member

@nielsdos nielsdos commented Aug 5, 2025

No description provided.

@nielsdos nielsdos linked an issue Aug 5, 2025 that may be closed by this pull request
RETURN_THROWS();
}

if (UNEXPECTED(ZEND_LONG_EXCEEDS_INT(day))) {
Copy link
Member

@devnexen devnexen Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious. if you want to insist on INT32 ranges why not doing the range check "manually" here ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code does not do +1/-1 on the day, so that's fine.
ZEND_LONG_EXCEEDS_INT will also avoid a warning on 32-bit systems where zend_long==int.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes I missed the former.. ok !

Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having worked a bit on calendar, the changes look correct to me

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

integer overflow in calendar.c

2 participants