Skip to content

ext/standard: Reject overflowing stream timeout sums - #24439

Open
iliaal wants to merge 1 commit into
php:PHP-8.4from
iliaal:fix/aph-y2y0
Open

iliaal wants to merge 1 commit into
php:PHP-8.4from
iliaal:fix/aph-y2y0

Conversation

@iliaal

@iliaal iliaal commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

stream_set_timeout() can overflow when seconds and microseconds are combined, or narrow the result on Windows. Validate the normalized value against the platform timeout range before conversion, preserving signed components and the -1 unlimited timeout. This addresses the overflow separately from the timeout policy changes in #16246.

Check the normalized timeout against the actual timeval seconds field
before conversion. Preserve signed components and the -1 unlimited timeout,
including on platforms with 64-bit time_t and 32-bit PHP integers.
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