提交 bcace45c 编写于 作者: G gavin1012_hw

Applying official patch for 'CVE-2021-43453: Fix parsing unterminated let statement'

Issue: I5MXN6
Signed-off-by: Ngavin1012_hw <wanggang203@huawei.com>
上级 fba42e4d
......@@ -1454,7 +1454,10 @@ parser_parse_for_statement_start (parser_context_t *context_p) /**< context */
parser_parse_expression_statement (context_p, PARSE_EXPR);
break;
}
/* FALLTHRU */
}
case LEXER_KEYW_LET:
{
if (context_p->next_scanner_info_p->source_p == context_p->source_p
&& context_p->next_scanner_info_p->type != SCANNER_TYPE_BLOCK)
{
......@@ -1468,9 +1471,9 @@ parser_parse_for_statement_start (parser_context_t *context_p) /**< context */
}
context_p->token.type = LEXER_KEYW_LET;
/* FALLTHRU */
}
case LEXER_KEYW_LET:
case LEXER_KEYW_CONST:
{
if (context_p->next_scanner_info_p->source_p == source_p)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册