mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Java/ArithmeticTainted
java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql
This commit is contained in:
@@ -19,6 +19,8 @@ module ArithmeticOverflowConfig implements DataFlow::ConfigSig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Location getASelectedSinkLocation(DataFlow::Node sink) {
|
Location getASelectedSinkLocation(DataFlow::Node sink) {
|
||||||
|
result = sink.getLocation()
|
||||||
|
or
|
||||||
exists(ArithExpr exp | result = exp.getLocation() | overflowSink(exp, sink.asExpr()))
|
exists(ArithExpr exp | result = exp.getLocation() | overflowSink(exp, sink.asExpr()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,6 +45,8 @@ module ArithmeticUnderflowConfig implements DataFlow::ConfigSig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Location getASelectedSinkLocation(DataFlow::Node sink) {
|
Location getASelectedSinkLocation(DataFlow::Node sink) {
|
||||||
|
result = sink.getLocation()
|
||||||
|
or
|
||||||
exists(ArithExpr exp | result = exp.getLocation() | underflowSink(exp, sink.asExpr()))
|
exists(ArithExpr exp | result = exp.getLocation() | underflowSink(exp, sink.asExpr()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user