-
Notifications
You must be signed in to change notification settings - Fork 7
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
Snappy decompression will fail on certain sequence of bytes. #88
Comments
Motivation ---------- In cases where the stream decompression block read hits with a start point within the middle of a tag but then the literal is longer than the entire block available we are incorrectly handling the _lookbackPosition when we return. Modifications ------------- Refactor the handling to be a bit less confusing and correct the result. Add a test for the failure case. Fixes #88
Thanks for the repro, I believe I have the fix figured out. For general reference, the problem was specific to stream decompression with very long literal segments. Block decompression should have been unaffected. |
Awesome! Thanks for the quick reaction. |
Motivation ---------- In cases where the stream decompression block read hits with a start point within the middle of a tag but then the literal is longer than the entire block available we are incorrectly handling the _lookbackPosition when we return. Modifications ------------- Refactor the handling to be a bit less confusing and correct the result. Add a test for the failure case. Fixes #88
Using a certain sequence of bytes decompression will fail with
System.IO.InvalidDataException: 'Invalid copy offset'
I have made a PR demonstrating this here:
#87
The text was updated successfully, but these errors were encountered: