Fix possible infinite loop in reader.collectPages - #375
Open
tgulacsi wants to merge 15 commits into
Open
Conversation
Test against infinite loops, but don't embed third-party PDFs.
Author
|
Test with It should not timeout (but will on main). |
carlos7ags
previously approved these changes
Jul 2, 2026
This allows tokenizer to advance and avoid infinite loops. But I don't know whether this is the good solution, or should Tokenzier.Next() return an error in such cases?
Author
|
Tokenizer now advances all time, but this may be not the best solution. |
They're moot, but the CI requires it
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.
Description
Handle cycles in pagetree walk.
Problem
I've met with infinite loops in signing and page number retrieval - sorry, I don't have examples yet.
Checklist
gofmt -s -w .)make test)