Skip to content

Commit 54546f6

Browse files
committed
1 parent 8353fdd commit 54546f6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ module ArithmeticOverflowConfig implements DataFlow::ConfigSig {
1313
predicate isBarrier(DataFlow::Node n) { overflowBarrier(n) }
1414

1515
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
16+
17+
predicate observeDiffInformedIncrementalMode() {
18+
any() // merged with ArithmeticUnderflow in ArithmeticTainted.ql
19+
}
20+
21+
Location getASelectedSinkLocation(DataFlow::Node sink) {
22+
exists(ArithExpr exp | result = exp.getLocation() | overflowSink(exp, sink.asExpr()))
23+
}
1624
}
1725

1826
/**
@@ -29,6 +37,14 @@ module ArithmeticUnderflowConfig implements DataFlow::ConfigSig {
2937
predicate isBarrier(DataFlow::Node n) { underflowBarrier(n) }
3038

3139
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
40+
41+
predicate observeDiffInformedIncrementalMode() {
42+
any() // merged with ArithmeticOverflow in ArithmeticTainted.ql
43+
}
44+
45+
Location getASelectedSinkLocation(DataFlow::Node sink) {
46+
exists(ArithExpr exp | result = exp.getLocation() | underflowSink(exp, sink.asExpr()))
47+
}
3248
}
3349

3450
/**

0 commit comments

Comments
 (0)