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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reading truncated data when the next segment offset is set #326

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

adamreeve
Copy link
Owner

Fixes #317

The current logic for checking for truncated segments only checked whether the next segment offset was set to 0xFFFFFFFFFFFFFFFF, but it's also possible that the next segment offset could be beyond the end of the file, which would cause the channel length to be calculated incorrectly and result in zero padded data when reading all values and finding that the number of bytes expected couldn't be read.

@adamreeve adamreeve merged commit 1a118e0 into master Mar 4, 2024
19 checks passed
@adamreeve adamreeve deleted the truncated_data_issue branch March 4, 2024 20:02
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

Successfully merging this pull request may close these issues.

Inconsistent Behaviour With Truncated Files
1 participant