Skip to content

Commit 7644012

Browse files
authored
Merge pull request #18737 from jbj/NumericCastTaintedQuery-selectedLocation
Java: precise diff-informed NumericCastTainted
2 parents 5a49390 + 71c078d commit 7644012

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)