Skip to content

Commit 21e04a3

Browse files
committed
Java: ArithmeticTainted
1 parent faca558 commit 21e04a3

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,11 @@ module ArithmeticOverflowConfig implements DataFlow::ConfigSig {
1515
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
1616

1717
predicate observeDiffInformedIncrementalMode() {
18-
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 28 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@35:8:35:10), Column 5 does not select a source or sink originating from the flow call on line 28 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@37:3:37:18)
19-
}
20-
21-
Location getASelectedSourceLocation(DataFlow::Node source) {
22-
none() // TODO: Make sure that this source location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 28 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@35:8:35:10), Column 5 does not select a source or sink originating from the flow call on line 28 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@37:3:37:18)
18+
any() // merged with ArithmeticUnderflow in ArithmeticTainted.ql
2319
}
2420

2521
Location getASelectedSinkLocation(DataFlow::Node sink) {
26-
none() // TODO: Make sure that this sink location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 28 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@35:8:35:10), Column 5 does not select a source or sink originating from the flow call on line 28 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@37:3:37:18)
22+
exists(ArithExpr exp | result = exp.getLocation() | overflowSink(exp, sink.asExpr()))
2723
}
2824
}
2925

@@ -43,15 +39,11 @@ module ArithmeticUnderflowConfig implements DataFlow::ConfigSig {
4339
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
4440

4541
predicate observeDiffInformedIncrementalMode() {
46-
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 32 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@35:8:35:10), Column 5 does not select a source or sink originating from the flow call on line 32 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@37:3:37:18)
47-
}
48-
49-
Location getASelectedSourceLocation(DataFlow::Node source) {
50-
none() // TODO: Make sure that this source location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 32 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@35:8:35:10), Column 5 does not select a source or sink originating from the flow call on line 32 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@37:3:37:18)
42+
any() // merged with ArithmeticOverflow in ArithmeticTainted.ql
5143
}
5244

5345
Location getASelectedSinkLocation(DataFlow::Node sink) {
54-
none() // TODO: Make sure that this sink location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 32 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@35:8:35:10), Column 5 does not select a source or sink originating from the flow call on line 32 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@37:3:37:18)
46+
exists(ArithExpr exp | result = exp.getLocation() | underflowSink(exp, sink.asExpr()))
5547
}
5648
}
5749

0 commit comments

Comments
 (0)