Repository navigation
fix: validate parser input and reuse checked binary reads - #1050
Merged
Merged
Conversation
andiwand
force-pushed
the
review/31-ooxml-package-paths
branch
from
October 5, 2026 08:18
4b5e7c3 to
33b1165
Compare
andiwand
force-pushed
the
review/32-parser-boundaries
branch
from
October 5, 2026 08:29
e70f246 to
c759c79
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
Markdown inline code now replaces NUL bytes with U+FFFD; inputs exceeding md4c’s size type fail before narrowing. RTF rejects unreadable streams and uses the shared chunked byte reader for binary payloads. Legacy PowerPoint uses the same reader and rejects incomplete text records.
This removes both I/O calls from
resize_and_overwritecallbacks, which cannot safely throw, and removes a duplicate chunk-reading implementation.Validation: 83 Markdown, RTF, PowerPoint, and byte-reader tests pass. The new inline-code case failed before the fix; focused regressions cover unreadable streams, throwing reads, record boundaries, and oversized length claims. The multi-gigabyte Markdown size guard was reviewed without allocating a fixture.