mirror of
https://github.com/php/php-src.git
synced 2026-04-29 11:13:36 +02:00
81916758ec
We need to avoid signed integer overflows which are undefined behavior. We catch that, and set `offset` to `ZEND_LONG_MAX` (which is also the largest value of `zend_off_t` on all platforms). Of course, that seek may fail, but even if it succeeds, the stream is no longer readable, but that matches the current behavior for offsets near `ZEND_LONG_MAX`. Closes GH-15989.