Skip to content

Commit 25e4f2c

Browse files
committed
limit concretize to strings of at most length 100
1 parent cf53956 commit 25e4f2c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

shared/regex/codeql/regex/nfa/NfaUtils.qll

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -862,9 +862,12 @@ module Make<RegexTreeViewSig TreeImpl> {
862862
RegExpTerm repr;
863863

864864
State() {
865-
this = Match(repr, _) or
866-
this = Accept(repr) or
867-
this = AcceptAnySuffix(repr)
865+
(
866+
this = Match(repr, _) or
867+
this = Accept(repr) or
868+
this = AcceptAnySuffix(repr)
869+
) and
870+
repr instanceof RelevantRegExpTerm
868871
}
869872

870873
/**
@@ -1457,7 +1460,8 @@ module Make<RegexTreeViewSig TreeImpl> {
14571460
result = getChar(ancestor) and
14581461
ancestor = getAnAncestor(n) and
14591462
i = nodeDepth(ancestor)
1460-
)
1463+
) and
1464+
nodeDepth(n) < 100
14611465
}
14621466

14631467
/** Gets a string corresponding to `node`. */

0 commit comments

Comments
 (0)