Skip to content

Commit 0bcdb42

Browse files
committed
1 parent 54546f6 commit 0bcdb42

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ module ArithmeticUncontrolledOverflowConfig implements DataFlow::ConfigSig {
1919
predicate isSink(DataFlow::Node sink) { overflowSink(_, sink.asExpr()) }
2020

2121
predicate isBarrier(DataFlow::Node n) { overflowBarrier(n) }
22+
23+
predicate observeDiffInformedIncrementalMode() {
24+
any() // merged with ArithmeticUncontrolledUnderflow in ArithmeticUncontrolled.ql
25+
}
26+
27+
Location getASelectedSinkLocation(DataFlow::Node sink) {
28+
exists(ArithExpr exp | result = exp.getLocation() | overflowSink(exp, sink.asExpr()))
29+
}
2230
}
2331

2432
/** Taint-tracking flow to reason about overflow from arithmetic with uncontrolled values. */
@@ -32,6 +40,14 @@ module ArithmeticUncontrolledUnderflowConfig implements DataFlow::ConfigSig {
3240
predicate isSink(DataFlow::Node sink) { underflowSink(_, sink.asExpr()) }
3341

3442
predicate isBarrier(DataFlow::Node n) { underflowBarrier(n) }
43+
44+
predicate observeDiffInformedIncrementalMode() {
45+
any() // merged with ArithmeticUncontrolledOverflow in ArithmeticUncontrolled.ql
46+
}
47+
48+
Location getASelectedSinkLocation(DataFlow::Node sink) {
49+
exists(ArithExpr exp | result = exp.getLocation() | underflowSink(exp, sink.asExpr()))
50+
}
3551
}
3652

3753
/** Taint-tracking flow to reason about underflow from arithmetic with uncontrolled values. */

0 commit comments

Comments
 (0)