File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
python/ql/src/semmle/python Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ abstract class RegexString extends Expr {
128
128
private predicate singleEscape ( int i ) {
129
129
exists ( string c |
130
130
c = this .getChar ( i ) and
131
- c != "x" and c != "U"
131
+ c != "x" and c != "U" and c != "N"
132
132
)
133
133
}
134
134
@@ -143,6 +143,16 @@ abstract class RegexString extends Expr {
143
143
or
144
144
this .getChar ( start + 1 ) = "U" and end = start + 10
145
145
or
146
+ this .getChar ( start + 1 ) = "N" and
147
+ this .getChar ( start + 2 ) = "{" and
148
+ this .getChar ( end - 1 ) = "}" and
149
+ end > start and
150
+ not exists ( int i |
151
+ i > start + 2 and
152
+ i < end - 1 and
153
+ this .getChar ( i ) = "}"
154
+ )
155
+ or
146
156
this .singleEscape ( start + 1 ) and end = start + 2
147
157
)
148
158
}
You can’t perform that action at this time.
0 commit comments