-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Relative stream possible issue with pointers #27
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was looking through stream implementation. Relative stream and the stream it wraps are sharing same pointer, right?
So if we rewind wrapped stream, read on relative will return data before offset position.
Also tell() will give negative position, which is out of bounds error.
This shared pointer in streams looks extremely bug prone to me.
May be on seekable streams we should store pointer locally, set it before performing operation and record new position after doing it?
As simplified example:
Originally posted by @Xerkus at zendframework/zend-diactoros#147
The text was updated successfully, but these errors were encountered: