Skip to content

Commit 903e9f2

Browse files
authored
Commit 3: Remove \U unicode-escape residue; keep only ECMAScript \uHHHH
\U is a Ruby/PCRE-ism, not ECMAScript. Restrict RegExpEscape.isUnicode()/getUnicode() to lowercase \uHHHH only. No \U path exists in ParseRegExp.qll's escapedCharacter, and no corpus case references \U. .expected files unchanged. Bundle: github/codeql-action codeql-bundle-v2.26.1 (CodeQL CLI 2.26.1).
1 parent 76e3118 commit 903e9f2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎cpp/ql/lib/semmle/code/cpp/regex/RegexTreeView.qll‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ private module Impl implements RegexTreeViewSig {
640640
/**
641641
* Holds if this is a unicode escape.
642642
*/
643-
private predicate isUnicode() { this.getText().prefix(2) = ["\\u", "\\U"] }
643+
private predicate isUnicode() { this.getText().prefix(2) = "\\u" }
644644

645645
/**
646646
* Gets the unicode char for this escape.

0 commit comments

Comments
 (0)