Skip to content

Commit 3e7bac4

Browse files
committed
JS: fix join ordering in SimpleParameter.getJSDocTag
1 parent db3060d commit 3e7bac4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

javascript/ql/src/semmle/javascript/Variables.qll

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,14 @@ class SimpleParameter extends Parameter, VarDecl {
628628
override JSDocParamTag getJSDocTag() {
629629
exists(Function fun |
630630
this = fun.getAParameter() and
631-
result = fun.getDocumentation().getATag() and
632-
result.getName() = getName()
631+
result = fun.getDocumentation().getATag()
632+
) and
633+
// Avoid joining on name
634+
exists(string tagName, string paramName |
635+
tagName = result.getName() and
636+
paramName = this.getName() and
637+
tagName <= paramName and
638+
paramName <= tagName
633639
)
634640
}
635641
}

0 commit comments

Comments
 (0)