Repository navigation
fix: handle PDF file boundaries and final cross-reference markers - #1151
Merged
Merged
Conversation
andiwand
force-pushed
the
review/132-pdf-color-validation
branch
from
October 6, 2026 17:24
c17a83d to
0df3144
Compare
andiwand
force-pushed
the
review/133-pdf-file-boundaries
branch
from
October 6, 2026 17:33
9782e86 to
525d513
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
PDF file traversal consumed the first object when the optional binary-marker comment was absent, missed versioned header entries and objects sharing a line, and left EOF entries unconsumed. Trailer seeking picked the first marker and could loop indefinitely when entered with failed stream state.
Read only actual header comments, detect indirect objects by their leading number, and consume EOF. Trailer seeking clears stream state, checks progress, and selects the last complete startxref line in the final 1024 bytes.
Validation: the parent fails header traversal and hangs in the failed-stream trailer regression (terminated). All 71 focused file/parser/writer/annotation tests pass, including partial-line boundaries and optional comments; LLVM 22 clang-tidy passes.