Repository navigation
fix: bound Word metadata and character piece reads - #1053
Merged
Merged
Conversation
andiwand
force-pushed
the
review/34-doc-fib-storage
branch
from
October 5, 2026 08:59
653bedc to
aa33203
Compare
The bounded font table now threw for an odd byte after a name, a name without its NUL and a nonzero cbExtra. The old reader skipped the first and the last, and took a name without NUL whole. The font table only affects styling, so one quirky name stopped the whole document. Inside the declared length, the reader again tolerates these cases. An FFN shorter than its fixed part still throws. AGENTS.md lists the cases and is wrapped at 80 columns again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gb1fLafqqzehpqPuU6uBfn
andiwand
force-pushed
the
review/35-doc-table-bounds
branch
from
October 5, 2026 09:06
4594dc0 to
c1bbcc0
Compare
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.
🤖 Generated with Claude Code
Legacy Word now bounds Clx and font-table reads by the FIB’s declared lengths and rejects incomplete piece-table bodies. PLC entries use the shared checked byte reader instead of potentially unaligned pointer casts. Character pieces must be contiguous, cover the body, and fit the stream-offset range; index lookups respect exclusive ends and iterator ownership.
Validation: 14 Word/encryption tests and 17 DOC corpus cases pass; the encrypted corpus case remains skipped. Existing font and document fixtures now exercise short declared tables and missing body coverage. Two focused tests cover PLC alignment/index bounds and character-range boundaries.