Introduce StackDepthGuard class to check for stack depth in CoreTokenScanner and fix #1217#1220
Merged
BobLd merged 1 commit intoUglyToad:masterfrom Dec 23, 2025
Merged
Conversation
Contributor
|
Ack. I would make the Enter() return an IDisposable so you can use |
EliotJones
approved these changes
Dec 2, 2025
7d17c99 to
8d89184
Compare
This was referenced Mar 23, 2026
TheCodeTraveler
pushed a commit
to TheCodeTraveler/MAUIChatGPTClone
that referenced
this pull request
Mar 23, 2026
Updated [PdfPig](https://github.com/UglyToad/PdfPig) from 0.1.13 to 0.1.14. <details> <summary>Release notes</summary> _Sourced from [PdfPig's releases](https://github.com/UglyToad/PdfPig/releases)._ ## 0.1.14 ## Auto generated release notes * Increment version to 0.1.14 by @BobLd in UglyToad/PdfPig#1231 * Introduce StackDepthGuard class to check for stack depth in CoreTokenScanner and fix #1217 by @BobLd in UglyToad/PdfPig#1220 * Add Links to Pdf Generation by @ochsnerd in UglyToad/PdfPig#1232 * Make LinkAnnotation internal to fix unit tests by @BobLd in UglyToad/PdfPig#1239 * Only throw if ArrayToken length is lesss than 4 in ToRectangle() and fix #1238 by @BobLd in UglyToad/PdfPig#1240 * Handle empty encoding in Type1FontSimple and fix #1248 by @BobLd in UglyToad/PdfPig#1249 * Make extended graphics states stacked too by @PsykerUdot in UglyToad/PdfPig#1246 * both Tj and TJ operators should increment text sequence #1241 by @EliotJones in UglyToad/PdfPig#1251 * Improve HasFormXObjectCircularReference and fix #1250 by @BobLd in UglyToad/PdfPig#1252 * replace release flow single job with pr process by @EliotJones in UglyToad/PdfPig#1253 * Add UglyToad.PdfPig.Benchmarks and misc performance improvements by @BobLd in UglyToad/PdfPig#1255 * Make LinkAnnotation public by @BobLd in UglyToad/PdfPig#1256 * revert flate decode handling to more lenient processing by @EliotJones in UglyToad/PdfPig#1254 * Fix Benchmarks solution and add BruteForceBenchmarks by @BobLd in UglyToad/PdfPig#1260 * Additional digital corpora testing by @EliotJones in UglyToad/PdfPig#1261 * Introduce IBlock and ILettersBlock interfaces (Round 2) by @davebrokit in UglyToad/PdfPig#1263 * Improve SystemFontFinder performance and add benchmarks by @BobLd in UglyToad/PdfPig#1264 * For shading types 4 to 7, add Data property containing descriptive data characterizing the shading's gradient fill by @BobLd in UglyToad/PdfPig#1267 * creating branch in the previous step conflicts by @EliotJones in UglyToad/PdfPig#1269 * change the release flow to work on tags by @EliotJones in UglyToad/PdfPig#1271 ## New Contributors * @ochsnerd made their first contribution in UglyToad/PdfPig#1232 **Full Changelog**: UglyToad/PdfPig@0.1.13...v0.1.14 Commits viewable in [compare view](UglyToad/PdfPig@0.1.13...v0.1.14). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Mar 23, 2026
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.
I'm not a huge fan of having to introduce a new class in order to track stack depth, but without an in-depth refactoring of
CoreTokenScanner, this is needed to fix #1217 This approach could hide stack overflows that could be properly addressed@rhuijben just to highlight the change since I believe this would need to be taken in account in the refactoring you worked on. The existing implementation of Array and Dictionary Tokenizer classes are the root cause of the issue, as they recursively call
CoreTokenScanner.MoveNext(). Finding a way to be able to track stack depth without having to rely onStackDepthGuardwould be a better approach.@EliotJones if you have an opinion on the change.
I want to wait for the next release of PdfPig before release this change