Skip to content

Commit 71c078d

Browse files
committed
Java: precise diff-informed NumericCastTainted
It was discovered by the upcoming support for exact locations matching in diff-informed testing that this data-flow configuration did not correspond exactly to the query.
1 parent 2a32e88 commit 71c078d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ module NumericCastFlowConfig implements DataFlow::ConfigSig {
104104
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
105105

106106
predicate observeDiffInformedIncrementalMode() { any() }
107+
108+
Location getASelectedSinkLocation(DataFlow::Node sink) {
109+
exists(NumericNarrowingCastExpr cast |
110+
cast.getExpr() = sink.asExpr() and
111+
result = cast.getLocation()
112+
)
113+
}
107114
}
108115

109116
/**

0 commit comments

Comments
 (0)