-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Audit bad uses of Read #4793
Comments
Not very common but, read can also:
|
Yes, but that case is also seriously discouraged. We should handle it but handling it may often involve returning a |
Maybe, it is rare enough that it unlikely we need to write special code for it. This may mean looping until we get an EOF. The worst thing this will do is waste CPU time unless the Reader is broken in which case the function may never return. For example the fix #4710 (as of the time I wrote this comment) will simply loop until it gets an EOF. Returning The only thing we should not do is break out of a loop and not return any indication of an error when no data is read. |
Yes. Absolutely. |
Read can:
We haven't been handling these cases well leading to #4781. We need to audit all uses of Read.
Progress:
(I'm ignoring test cases for now)
The text was updated successfully, but these errors were encountered: