Skip to content

Commit e5c8d6e

Browse files
committed
Java/ArithmeticUncontrolledQuery
java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql
1 parent 02a0eef commit e5c8d6e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

java/ql/lib/semmle/code/java/security/ArithmeticUncontrolledQuery.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module ArithmeticUncontrolledOverflowConfig implements DataFlow::ConfigSig {
2525
}
2626

2727
Location getASelectedSinkLocation(DataFlow::Node sink) {
28+
result = sink.getLocation()
29+
or
2830
exists(ArithExpr exp | result = exp.getLocation() | overflowSink(exp, sink.asExpr()))
2931
}
3032
}
@@ -46,6 +48,8 @@ module ArithmeticUncontrolledUnderflowConfig implements DataFlow::ConfigSig {
4648
}
4749

4850
Location getASelectedSinkLocation(DataFlow::Node sink) {
51+
result = sink.getLocation()
52+
or
4953
exists(ArithExpr exp | result = exp.getLocation() | underflowSink(exp, sink.asExpr()))
5054
}
5155
}

0 commit comments

Comments
 (0)