Skip to content

Add test for Phar::buildFromIterator() with a negative getMTime() - #24779

Open
marc-mabe wants to merge 2 commits into
php:PHP-8.6from
marc-mabe:fix-zend-long-uint-ovfl-32bit-8.6
Open

marc-mabe wants to merge 2 commits into
php:PHP-8.6from
marc-mabe:fix-zend-long-uint-ovfl-32bit-8.6

Conversation

@marc-mabe

Copy link
Copy Markdown
Contributor

The fix of #24778 also makes Phar::buildFromIterator() reject a negative timestamp there targeting 8.6

This is based on #24778 (cherry-picked)
This is split from #23688

Where zend_long is not wider than an int, ZEND_LONG_UINT_OVFL() was
defined as 0, so a negative value passed the check there, while it is
rejected where zend_long is wider. Keep checking the lower bound on these
platforms too.

This affects mbstring.regex_stack_limit, mbstring.regex_retry_limit and
the codepage of sapi_windows_cp_set() and sapi_windows_cp_conv().
The fix of ZEND_LONG_UINT_OVFL() on 32-bit platforms also makes
Phar::buildFromIterator() reject a negative timestamp there.
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.

1 participant