mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-14 21:11:57 +00:00
LibWeb: Don't crash when parsing ASF with non comma-separated arguments
This commit is contained in:
parent
193900d661
commit
c4cf1ccede
Notes:
github-actions[bot]
2025-07-09 18:48:23 +00:00
Author: https://github.com/tcl3
Commit: c4cf1ccede
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5375
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 359 additions and 1 deletions
|
@ -347,7 +347,9 @@ Optional<ArbitrarySubstitutionFunctionArguments> parse_according_to_argument_gra
|
|||
if (!tokens.has_next_token())
|
||||
return ArbitrarySubstitutionFunctionArguments { first_argument.release_value() };
|
||||
|
||||
VERIFY(tokens.next_token().is(Token::Type::Comma));
|
||||
if (!tokens.next_token().is(Token::Type::Comma))
|
||||
return {};
|
||||
|
||||
tokens.discard_a_token(); // ,
|
||||
|
||||
auto second_argument = Parser::parse_declaration_value(tokens, Parser::StopAtComma::No);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue