Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ConsumeRestrictedPropertyValue() when testing variable-using prop…
…erty validity. Earlier, the property parser would only receive values that were checked using ConsumeRestrictedPropertyValue(), which has a fail-fast whenever it sees a left brace. However, with the streaming parser being used for value parsing, we just consumed until the end of the semicolon instead, which is correct but misses the fail-fast, causing potential O(n²) behavior with nested rules. Reintroduce it. This also fixes an issue where, if we failed to parse the last token, we could have stream_.Offset() at the end of the parse never advancing past the initial lookahead offset, causing an integer overflow. Fixed: 340702955 Fixed: 340919085 Change-Id: I5d9814f87536e8cc7dc6742a39f22abd83c40d85 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5543881 Auto-Submit: Steinar H Gunderson <sesse@chromium.org> Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Commit-Queue: Steinar H Gunderson <sesse@chromium.org> Cr-Commit-Position: refs/heads/main@{#1301864}
- Loading branch information