Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Should not allow malformed \x escapes
https://bugs.webkit.org/show_bug.cgi?id=79462 Reviewed by Oliver Hunt. Source/JavaScriptCore: * parser/Lexer.cpp: (JSC::::parseString): (JSC::::parseStringSlowCase): - Prohibit malformed '\x' escapes * tests/mozilla/ecma/Array/15.4.5.1-1.js: * tests/mozilla/ecma/LexicalConventions/7.7.4.js: * tests/mozilla/ecma_2/RegExp/hex-001.js: * tests/mozilla/js1_2/regexp/hexadecimal.js: - Remove erroneous test cases (correct behaviour is tested by LayoutTests/sputnik). LayoutTests: * fast/regex/script-tests/pcre-test-1.js: - Fix bad escapes in test case. * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T6-expected.txt: * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A6.1_T4-expected.txt: * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A6.2_T1-expected.txt: * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A6.2_T2-expected.txt: - Check in passing results. Canonical link: https://commits.webkit.org/96615@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@108841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
70 additions
and 28 deletions.
- +15 −0 LayoutTests/ChangeLog
- +1 −1 LayoutTests/fast/regex/script-tests/pcre-test-1.js
- +2 −1 ...Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T6-expected.txt
- +2 −1 ...Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A6.1_T4-expected.txt
- +2 −1 ...Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A6.2_T1-expected.txt
- +2 −1 ...Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A6.2_T2-expected.txt
- +17 −0 Source/JavaScriptCore/ChangeLog
- +18 −16 Source/JavaScriptCore/parser/Lexer.cpp
- +3 −1 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.5.1-1.js
- +5 −4 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.7.4.js
- +2 −1 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/hex-001.js
- +1 −1 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/hexadecimal.js
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,6 +1,7 @@ | ||
CONSOLE MESSAGE: line 77: SyntaxError: \x can only be followed by a hex character sequence | ||
S7.8.4_A4.3_T6 | ||
|
||
PASS Expected parsing failure | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,6 +1,7 @@ | ||
CONSOLE MESSAGE: line 77: SyntaxError: \x can only be followed by a hex character sequence | ||
S7.8.4_A6.1_T4 | ||
|
||
PASS Expected parsing failure | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,6 +1,7 @@ | ||
CONSOLE MESSAGE: line 77: SyntaxError: \x can only be followed by a hex character sequence | ||
S7.8.4_A6.2_T1 | ||
|
||
PASS Expected parsing failure | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,6 +1,7 @@ | ||
CONSOLE MESSAGE: line 77: SyntaxError: \x can only be followed by a hex character sequence | ||
S7.8.4_A6.2_T2 | ||
|
||
PASS Expected parsing failure | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters