Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized string offset warning with unterminated color literal #183

Open
nikic opened this issue Dec 25, 2019 · 0 comments
Open

Uninitialized string offset warning with unterminated color literal #183

nikic opened this issue Dec 25, 2019 · 0 comments

Comments

@nikic
Copy link

nikic commented Dec 25, 2019

Parsing the input a{f:#1 produces an uninitialized string offset warning:

Error: [2] Uninitialized string offset: 1 in /home/nikic/PHP-Fuzzer/example/PHP-CSS-Parser/lib/Sabberworm/CSS/Value/Color.php on line 33 in /home/nikic/PHP-Fuzzer/src/Fuzzer.php:471
Stack trace:
#0 /home/nikic/PHP-Fuzzer/example/PHP-CSS-Parser/lib/Sabberworm/CSS/Value/Color.php(33): PhpFuzzer\Fuzzer->PhpFuzzer\{closure}(2, 'Uninitialized s...', '/home/nikic/PHP...', 33)
#1 /home/nikic/PHP-Fuzzer/example/PHP-CSS-Parser/lib/Sabberworm/CSS/Value/Value.php(84): Sabberworm\CSS\Value\Color::parse(Object(Sabberworm\CSS\Parsing\ParserState))
#2 /home/nikic/PHP-Fuzzer/example/PHP-CSS-Parser/lib/Sabberworm/CSS/Value/Value.php(36): Sabberworm\CSS\Value\Value::parsePrimitiveValue(Object(Sabberworm\CSS\Parsing\ParserState))
#3 /home/nikic/PHP-Fuzzer/example/PHP-CSS-Parser/lib/Sabberworm/CSS/Rule/Rule.php(39): Sabberworm\CSS\Value\Value::parseValue(Object(Sabberworm\CSS\Parsing\ParserState), Array)
#4 /home/nikic/PHP-Fuzzer/example/PHP-CSS-Parser/lib/Sabberworm/CSS/RuleSet/RuleSet.php(35): Sabberworm\CSS\Rule\Rule::parse(Object(Sabberworm\CSS\Parsing\ParserState))
#5 /home/nikic/PHP-Fuzzer/example/PHP-CSS-Parser/lib/Sabberworm/CSS/RuleSet/DeclarationBlock.php(62): Sabberworm\CSS\RuleSet\RuleSet::parseRuleSet(Object(Sabberworm\CSS\Parsing\ParserState), Object(Sabberworm\CSS\RuleSet\DeclarationBlock))
#6 /home/nikic/PHP-Fuzzer/example/PHP-CSS-Parser/lib/Sabberworm/CSS/CSSList/CSSList.php(101): Sabberworm\CSS\RuleSet\DeclarationBlock::parse(Object(Sabberworm\CSS\Parsing\ParserState), Object(Sabberworm\CSS\CSSList\Document))
#7 /home/nikic/PHP-Fuzzer/example/PHP-CSS-Parser/lib/Sabberworm/CSS/CSSList/CSSList.php(50): Sabberworm\CSS\CSSList\CSSList::parseListItem(Object(Sabberworm\CSS\Parsing\ParserState), Object(Sabberworm\CSS\CSSList\Document))
#8 /home/nikic/PHP-Fuzzer/example/PHP-CSS-Parser/lib/Sabberworm/CSS/CSSList/Document.php(21): Sabberworm\CSS\CSSList\CSSList::parseList(Object(Sabberworm\CSS\Parsing\ParserState), Object(Sabberworm\CSS\CSSList\Document))
#9 /home/nikic/PHP-Fuzzer/example/PHP-CSS-Parser/lib/Sabberworm/CSS/Parser.php(38): Sabberworm\CSS\CSSList\Document::parse(Object(Sabberworm\CSS\Parsing\ParserState))
#10 /home/nikic/PHP-Fuzzer/example/target_css_parser.php(9): Sabberworm\CSS\Parser->parse()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant