Repository navigation
Bound block reference parsing depth - #4030
Conversation
Limit nested EIP-1898 block references to 16 levels to prevent quadratic parsing time on deeply nested inputs. Add boundary coverage.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4030 +/- ##
==========================================
- Coverage 61.34% 60.34% -1.01%
==========================================
Files 2163 2064 -99
Lines 188757 177173 -11584
==========================================
- Hits 115792 106912 -8880
+ Misses 62256 60491 -1765
+ Partials 10709 9770 -939
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
PR SummaryMedium Risk Overview
Reviewed by Cursor Bugbot for commit b684c55. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
There was a problem hiding this comment.
Converts the recursive EIP-1898 block-reference parser into a loop bounded at 16 nesting levels, removing the quadratic parse cost and stack-depth exposure while keeping over-depth inputs on the existing "unparseable reference routes live" path. The boundary is off-by-one correct and the new test pins both the accepted (16) and rejected (17) cases.
Findings: 0 blocking | 0 non-blocking | 0 posted inline
Blockers
- None at the file/PR level.
Non-blocking
- None at the file/PR level.
|
@seidroid review |
There was a problem hiding this comment.
Bounds EIP-1898 block-reference parsing to a configurable nesting depth (default 16), replacing unbounded recursion with a loop; the boundary arithmetic, fallback routing, and validation at both the flag and router construction paths all check out, with test coverage on each. No findings.
Findings: 0 blocking | 0 non-blocking | 0 posted inline
Blockers
- None at the file/PR level.
Non-blocking
- None at the file/PR level.
|
Successfully created backport PR for |
|
Successfully created backport PR for |
Backport of #4030 to `release/v6.6`. Co-authored-by: Masih H. Derkani <m@derkani.org>
Backport of #4030 to `release/v6.7`. Co-authored-by: Masih H. Derkani <m@derkani.org>
Limit nested EIP-1898 block references to 16 levels to prevent quadratic parsing time on deeply nested inputs. Add boundary coverage.
Fixes PLT-1083