From bcace45c1213a2a942dd15e6be60e08adcdda021 Mon Sep 17 00:00:00 2001 From: gavin1012_hw Date: Fri, 26 Aug 2022 21:56:44 +0800 Subject: [PATCH 1/3] Applying official patch for 'CVE-2021-43453: Fix parsing unterminated let statement' Issue: I5MXN6 Signed-off-by: gavin1012_hw --- jerry-core/parser/js/js-parser-statm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jerry-core/parser/js/js-parser-statm.c b/jerry-core/parser/js/js-parser-statm.c index 9a4264c2..4e781d11 100644 --- a/jerry-core/parser/js/js-parser-statm.c +++ b/jerry-core/parser/js/js-parser-statm.c @@ -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) -- Gitee From 8a22b986e7e15004a2a26593837f838c3b4b4923 Mon Sep 17 00:00:00 2001 From: gavin1012_hw Date: Sat, 27 Aug 2022 16:56:32 +0800 Subject: [PATCH 2/3] Fix utils-native-lite path Issue: I5OEJW Signed-off-by: gavin1012_hw --- jerry-core/BUILD.gn | 2 +- jerry-ext/BUILD.gn | 2 +- jerry-port/default/BUILD.gn | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jerry-core/BUILD.gn b/jerry-core/BUILD.gn index aff10c40..1aa246f1 100644 --- a/jerry-core/BUILD.gn +++ b/jerry-core/BUILD.gn @@ -264,7 +264,7 @@ if (board_toolchain_type != "iccarm") { include_dirs += [ "$port_path", "$port_path/default/include", - "//utils/native/lite/memory/include", + "//commonlibrary/utils_lite/memory/include", ] } } diff --git a/jerry-ext/BUILD.gn b/jerry-ext/BUILD.gn index 33b2ee84..0ee09d90 100644 --- a/jerry-ext/BUILD.gn +++ b/jerry-ext/BUILD.gn @@ -86,7 +86,7 @@ if (board_toolchain_type == "iccarm") { include_dirs += [ "${core_path}", "${core_path}/jrt", - "//utils/native/lite/memory/include", + "//commonlibrary/utils_lite/memory/include", ] } } diff --git a/jerry-port/default/BUILD.gn b/jerry-port/default/BUILD.gn index 15e9430d..dd7c5c9b 100644 --- a/jerry-port/default/BUILD.gn +++ b/jerry-port/default/BUILD.gn @@ -87,7 +87,7 @@ if (board_toolchain_type == "iccarm") { "${core_path}/parser/regexp", "${core_path}/vm", "${port_path}", - "//utils/native/lite/memory/include", + "//commonlibrary/utils_lite/memory/include", ] } } -- Gitee From d5fb463b27edd5f3f8c1ddc052ccd52e2e9fe7be Mon Sep 17 00:00:00 2001 From: i-wangliangliang Date: Wed, 31 Aug 2022 16:19:31 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=BC=96=E8=AF=91=E4=BC=98=E5=8C=96Ohz?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E6=97=B6=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=B1=8F=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: i-wangliangliang Change-Id: I606b13acffea505d65867a568bf4e4c052fac12c --- jerry-core/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jerry-core/BUILD.gn b/jerry-core/BUILD.gn index aff10c40..93b4be10 100644 --- a/jerry-core/BUILD.gn +++ b/jerry-core/BUILD.gn @@ -232,7 +232,7 @@ if (board_toolchain_type != "iccarm") { config("jerry_core_config") { cflags = [ "--diag_suppress", - "Pa089,Pe111,Pe188,Pe191,Pe546,Pe940", + "Pa089,Pe111,Pe188,Pe191,Pe546,Pe940,Pe128", ] defines = [ "JERRY_FOR_IAR_CONFIG", -- Gitee