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
Encoder.ReadFrom() (added in v4) is buggy #183
Comments
lizthegrey
changed the title
v4 does not adequately guard against post-facto mutation of buffer passed in via Write()
ReadFrom() (added in v4) is buggy
May 18, 2022
lizthegrey
changed the title
ReadFrom() (added in v4) is buggy
Encoder.ReadFrom() (added in v4) is buggy
May 18, 2022
Verified my fixed branch works with |
Repro code:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I appear to have truncated output (corresponding to partial input), and err.EOF when
io.CopyN()
followed by some followup Write() on v4, whereas v3 works fine and doesn't operate on only partial input.when I buffer the output (which makes a copy for safety) in a bytes.Buffer() first before then using io.Copy() to send it all to lz4 at the same time, the output is not corrupted, because the copy is done with a single write and thus the Close() I manually trigger after is idempotent.
3d212bc (and all subsequent commits) fail, bb3370a passes my (non-minimal) testcase
The text was updated successfully, but these errors were encountered: