mirror of
https://github.com/github/codeql.git
synced 2026-03-23 07:56:54 +01:00
JS: add comment about arrays
This commit is contained in:
@@ -99,7 +99,10 @@ predicate isDerivedFromLength(DataFlow::Node length, DataFlow::Node operand) {
|
||||
}
|
||||
|
||||
/**
|
||||
* An equality comparison of form `A.indexOf(B) === A.length - B.length` or similar.
|
||||
* An equality comparison of form `A.indexOf(B) === A.length - B.length` or similar.
|
||||
*
|
||||
* We assume A and B are strings, even A and/or B could be also be arrays.
|
||||
* The comparison with the length rarely occurs for arrays, however.
|
||||
*/
|
||||
class UnsafeIndexOfComparison extends EqualityTest {
|
||||
IndexOfCall indexOf;
|
||||
|
||||
Reference in New Issue
Block a user