Temporary fix to prevent the parser from going too deep into recursion.

This commit is contained in:
Erik Verbruggen
2010-01-22 16:06:41 +01:00
parent d3acff747c
commit 4912ffe729
2 changed files with 9 additions and 1 deletions

View File

@@ -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)