Skip to content

Fix bug #52335: fseek() on memory stream behavior different than file #12058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

bukka
Copy link
Member

@bukka bukka commented Aug 27, 2023

This changes memory stream to allow seeking past end which makes it the same as seeking on files. It means the position is allowed to be higher than the string length. The size only increases if data is appended to the past position. The space between the previous string and position is filled with zero bytes.

Except other things this also allows seeking on php://input before data is written into it and thus fixes #9441.

@bukka bukka changed the title Fix bug #52335 (fseek() on memory stream behavior different then file) Fix bug #52335 (fseek() on memory stream behavior different than file) Aug 27, 2023
@bukka bukka changed the title Fix bug #52335 (fseek() on memory stream behavior different than file) Fix bug #52335: fseek() on memory stream behavior different than file Aug 27, 2023
@bukka bukka closed this in ba9650d Aug 28, 2023
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.

fseek does not work with php://input when data is not pre-read
1 participant