forked from qt-creator/qt-creator
Temporary fix to prevent the parser from going too deep into recursion.
This commit is contained in:
@@ -4507,7 +4507,13 @@ bool Parser::parseConstantExpression(ExpressionAST *&node)
|
||||
bool Parser::parseExpression(ExpressionAST *&node)
|
||||
{
|
||||
DEBUG_THIS_RULE();
|
||||
return parseCommaExpression(node);
|
||||
if (depth > 100)
|
||||
return false;
|
||||
|
||||
++depth;
|
||||
bool result = parseCommaExpression(node);
|
||||
--depth;
|
||||
return result;
|
||||
}
|
||||
|
||||
bool Parser::parseCommaExpression(ExpressionAST *&node)
|
||||
|
Reference in New Issue
Block a user