mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
14 lines
292 B
Plaintext
14 lines
292 B
Plaintext
/**
|
|
* @name Test for array access
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from Method m, ArrayAccess e
|
|
where
|
|
m.hasName("MainAccesses") and
|
|
e.getEnclosingCallable() = m and
|
|
e.getQualifier().(LocalVariableAccess).getTarget().getName() = "array" and
|
|
e.getIndex(0).(IntLiteral).getValue() = "1"
|
|
select m, e
|