Repository navigation
🐛 fix(css): bound unclosed function fallback - #1641
Merged
gaborbernat merged 1 commit intoNov 6, 2026
Merged
Conversation
gaborbernat
force-pushed
the
fix/fuzz-css-memory-20261106
branch
from
November 6, 2026 18:05
7fd5967 to
04f6112
Compare
gaborbernat
force-pushed
the
fix/fuzz-css-memory-20261106
branch
from
November 6, 2026 18:07
04f6112 to
e9d1032
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
gaborbernat
enabled auto-merge (squash)
November 6, 2026 18:38
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.
Summary
An unmatched function at the CSS nesting limit used the token count as an index, reading one past the token array. The resulting uninitialized length raised
MemoryErrorin the CSS stylesheet fuzzer.Use the final token when the function reaches the end of input. Include a trailing dimension unit and close blocks in the copied raw function, so the output stays balanced and stable on a second minification pass.
Checks
tox run -e dev -x env.dev.deps= -x env.dev.dependency_groups=test.tox/dev/bin/python -m pytest -q tests/css/minify/test_css.py(4,680 passed, 63 skipped)tox run -e 3.14(73,041 passed, 1,277 skipped; 100% C line and branch coverage)tox run -e warningsruff format --check,ruff check, andclang-format --dry-run --Werroron changed files