Repository navigation
Conversation
…alidation Permissive validation already repairs a FAT entry that points past the end of the file by ending the chain there, but several other spec violations that Word and LibreOffice tolerate were still fatal in both modes. Under Permissive validation they are now repaired the same way: - A FAT longer than the file is truncated to the file's sectors. - A FAT or MiniFAT sector pointed to twice ends the later chain there, so only that chain is truncated. - A MiniFAT entry pointing past the end of the MiniFAT ends its chain. - A directory entry's sibling or child that is out of range, or a child on a stream entry, is read as no link. Strict validation still rejects all of these. In a sample of about 2,300 real-world .doc files (Govdocs1 and the LibreOffice bug tracker), these were the reasons 6 genuine Word documents failed to open.
trypsynth
added a commit
to trypsynth/paperback
that referenced
this pull request
Oct 31, 2026
…hains or bad directory links, through a cfb fork until mdsteele/rust-cfb#97 lands Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Permissive validation already repairs a FAT entry that points past the end of the file by ending the chain there, but several other spec violations that Word and LibreOffice tolerate were still fatal in both modes. Under Permissive validation this repairs them the same way:
END_OF_CHAIN), or a child on a stream entry, is read as no link.Strict validation still rejects all of these, and each repair has a
_permissivetest next to the existing or new_strictone, checking that the repaired result then passes Strict validation.In a sample of about 2,300 real-world
.docfiles (Govdocs1 and attachments from the LibreOffice bug tracker), these were the reasons 6 genuine Word documents failed to open: "mini sector 0 pointed to twice" (4 files), "invalid left sibling: 4294967294" and "non-empty stream child". All six open with this change.