SkSL parser now limits recursion on comma operator as well
Bug: oss-fuzz:19994 Change-Id: I16c434509a83f2dcd19b2fe7650218f28bfaa3cd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286617 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
666622968c
commit
b67d056c30
@ -1513,7 +1513,11 @@ ASTNode::ID Parser::expression() {
|
||||
return ASTNode::ID::Invalid();
|
||||
}
|
||||
Token t;
|
||||
AutoDepth depth(this);
|
||||
while (this->checkNext(Token::Kind::TK_COMMA, &t)) {
|
||||
if (!depth.increase()) {
|
||||
return ASTNode::ID::Invalid();
|
||||
}
|
||||
ASTNode::ID right = this->assignmentExpression();
|
||||
if (!right) {
|
||||
return ASTNode::ID::Invalid();
|
||||
|
Loading…
Reference in New Issue
Block a user