Skip to content

Fix #74960: Heap buffer overflow via str_repeat#7294

Closed
cmb69 wants to merge 1 commit intophp:PHP-7.4from
cmb69:cmb/74960a
Closed

Fix #74960: Heap buffer overflow via str_repeat#7294
cmb69 wants to merge 1 commit intophp:PHP-7.4from
cmb69:cmb/74960a

Conversation

@cmb69
Copy link
Member

@cmb69 cmb69 commented Jul 21, 2021

Trying to allocate a zend_string with a length only slighty smaller
than SIZE_MAX causes an integer overflow, so callers may need to
check that explicitly. To make that easy in a portable way, we
introduce ZSTR_MAX_LEN.


This PR supersedes #7252.

Trying to allocate a `zend_string` with a length only slighty smaller
than `SIZE_MAX` causes an integer overflow, so callers may need to
check that explicitly.  To make that easy in a portable way, we
introduce `ZSTR_MAX_LEN`.
@cmb69 cmb69 closed this in 760ff84 Jul 21, 2021
@cmb69 cmb69 deleted the cmb/74960a branch July 21, 2021 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants