mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Java/ImproperValidationOfArrayConstructionFlow
java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstruction.ql
This commit is contained in:
@@ -18,6 +18,8 @@ module ImproperValidationOfArrayConstructionConfig implements DataFlow::ConfigSi
|
||||
predicate observeDiffInformedIncrementalMode() { any() }
|
||||
|
||||
Location getASelectedSinkLocation(DataFlow::Node sink) {
|
||||
result = sink.getLocation()
|
||||
or
|
||||
exists(ArrayCreationExpr arrayCreation, CheckableArrayAccess arrayAccess |
|
||||
result = [arrayCreation, arrayAccess.getIndexExpr()].getLocation() and
|
||||
arrayAccess.canThrowOutOfBoundsDueToEmptyArray(sink.asExpr(), arrayCreation)
|
||||
|
||||
Reference in New Issue
Block a user