mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
JS: Fix parsing of non-BMP chars before a quantifier
This commit is contained in:
@@ -1 +1,2 @@
|
||||
| tst.js:1:1:1:9 | /[\\u12340\\udf40-\\u12345\\udf45]/ | Character class with supplementary characters in non-unicode literal. |
|
||||
| tst.js:1:1:1:9 | /[\\u12340\\udf40-\\u12345\\udf45]/ | Split supplementary character in non-unicode literal. |
|
||||
| tst.js:3:1:3:5 | /\\u12340\\udf40+/ | Split supplementary character in non-unicode literal. |
|
||||
|
||||
@@ -8,5 +8,7 @@ where wideConstant.getLiteral() = literal and
|
||||
wideConstant.getParent() instanceof RegExpCharacterClass
|
||||
or
|
||||
wideConstant.getParent() instanceof RegExpCharacterRange
|
||||
or
|
||||
wideConstant.getParent() instanceof RegExpQuantifier
|
||||
)
|
||||
select literal, "Character class with supplementary characters in non-unicode literal."
|
||||
select literal, "Split supplementary character in non-unicode literal."
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
/[𒍀-𒍅]/; // NOT OK
|
||||
/[𒍀-𒍅]/u; // OK
|
||||
/𒍀+/; // NOT OK
|
||||
/𒍀+/u; // OK
|
||||
/(𒍀)+/; // OK
|
||||
|
||||
Reference in New Issue
Block a user