Skip to content

Commit c4d7672

Browse files
committed
JS: fix typo in method name
1 parent 0462eb4 commit c4d7672

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

javascript/ql/src/Security/CWE-020/IncorrectSuffixCheck.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class IndexOfCall extends DataFlow::MethodCallNode {
3131
/**
3232
* Gets an `indexOf` call with the same receiver, argument, and method name, including this call itself.
3333
*/
34-
IndexOfCall getAnEqualiventIndexOfCall() {
34+
IndexOfCall getAnEquivalentIndexOfCall() {
3535
result.getReceiver().getALocalSource() = this.getReceiver().getALocalSource() and
3636
result.getArgument(0).getALocalSource() = this.getArgument(0).getALocalSource() and
3737
result.getMethodName() = this.getMethodName()
@@ -118,13 +118,13 @@ class UnsafeIndexOfComparison extends EqualityTest {
118118

119119
// Check for indexOf being -1
120120
not exists (EqualityTest test, Expr minusOne |
121-
test.hasOperands(indexOf.getAnEqualiventIndexOfCall().asExpr(), minusOne) and
121+
test.hasOperands(indexOf.getAnEquivalentIndexOfCall().asExpr(), minusOne) and
122122
minusOne.getIntValue() = -1
123123
) and
124124

125125
// Check for indexOf being >1, or >=0, etc
126126
not exists (RelationalComparison test |
127-
test.getGreaterOperand() = indexOf.getAnEqualiventIndexOfCall().asExpr() and
127+
test.getGreaterOperand() = indexOf.getAnEquivalentIndexOfCall().asExpr() and
128128
exists (int value | value = test.getLesserOperand().getIntValue() |
129129
value >= 0
130130
or

0 commit comments

Comments
 (0)