Skip to content

fix: store the Word FIB prefix by value - #1052

Merged
andiwand merged 2 commits into
mainfrom
review/34-doc-fib-storage
Oct 5, 2026
Merged

andiwand merged 2 commits into
mainfrom
review/34-doc-fib-storage

Conversation

@andiwand

@andiwand andiwand commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Legacy Word allocated version-specific FIB structures and deleted them through non-virtual base pointers. The parser now stores the common prefix by value and drops the unused extended layouts. Counted extension data is bounded before reading its version-specific fields, and invalid FIB signatures are rejected.

The common prefix contains every offset currently consumed by the engine, so this removes unsafe ownership and unused structures while preserving newer-version support.

Validation: 12 Word/encryption tests and 17 DOC corpus cases pass; the encrypted corpus case remains skipped. One synthetic test covers supported extension versions, future base versions, surplus offset entries, truncated declared extensions, signatures, and negative body lengths.

@andiwand
andiwand force-pushed the review/33-ppt-record-bounds branch from e8d8950 to 856d022 Compare October 5, 2026 08:45
Base automatically changed from review/33-ppt-record-bounds to main October 5, 2026 08:55
andiwand and others added 2 commits October 5, 2026 10:55
The surplus fibRgW and fibRgLw entries and the grpprl of a Prc were
skipped with an unchecked ignore. A stream that ends inside them
continued at the wrong position. byte_stream::skip throws there, the
same as a short read.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gb1fLafqqzehpqPuU6uBfn
@andiwand
andiwand force-pushed the review/34-doc-fib-storage branch from 653bedc to aa33203 Compare October 5, 2026 08:59
@andiwand
andiwand merged commit 880fedc into main Oct 5, 2026
23 checks passed
@andiwand
andiwand deleted the review/34-doc-fib-storage branch October 5, 2026 09:01
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.

1 participant