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.
This commit is contained in:
Jonas Jensen
2025-02-11 13:49:15 +01:00
parent 2a32e8865d
commit 71c078dbdd

View File

@@ -104,6 +104,13 @@ module NumericCastFlowConfig implements DataFlow::ConfigSig {
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
predicate observeDiffInformedIncrementalMode() { any() }
Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(NumericNarrowingCastExpr cast |
cast.getExpr() = sink.asExpr() and
result = cast.getLocation()
)
}
}
/**