Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

negative read/write value on error #66

Open
ozanh opened this issue Aug 16, 2022 · 0 comments
Open

negative read/write value on error #66

ozanh opened this issue Aug 16, 2022 · 0 comments

Comments

@ozanh
Copy link

ozanh commented Aug 16, 2022

Hi,
Thank you for smb2 馃憤
I encountered a panic while copying a bufio.Reader to smb2.File which is due to a write error with a negative write size.
io.Writer, io.Reader, io.ReaderAt should return non-negative value even on error (https://cs.opensource.google/go/go/+/refs/tags/go1.19:src/bufio/bufio.go;drc=99f1bf54eb502e123e60c605212a616146fbe86a;l=559)

If it is possible, I would like to open a PR to replace all returning -1 with 0 values from io.Writer, io.Reader, io.ReaderAt , etc. implementations. Please let me know If I am missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant