Skip to content

Commit 3e28011

Browse files
committed
JS: Restrict size of hasNameParts
1 parent 3c6d258 commit 3e28011

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

javascript/ql/lib/semmle/javascript/JSDoc.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ class JSDocNamedTypeExpr extends JSDocTypeExpr {
372372
* - `Baz` has prefix `Baz` and an empty suffix.
373373
*/
374374
predicate hasNameParts(string prefix, string suffix) {
375+
not this = any(JSDocQualifiedTypeAccess a).getBase() and // restrict size of predicate
375376
exists(string regex, string name | regex = "([^.]+)(.*)" |
376377
name = this.getRawName() and
377378
prefix = name.regexpCapture(regex, 1) and

0 commit comments

Comments
 (0)