Java: Allow null literals as sources in data flow.

This commit is contained in:
Anders Schack-Mulligen
2020-01-22 12:04:42 +01:00
parent 80997a3323
commit b92203a87f
4 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import java
import semmle.code.java.dataflow.DataFlow
class Conf extends DataFlow::Configuration {
Conf() { this = "qqconf" }
override predicate isSource(DataFlow::Node n) { n.asExpr() instanceof NullLiteral }
override predicate isSink(DataFlow::Node n) { any() }
}
from Conf conf, DataFlow::Node src, DataFlow::Node sink
where conf.hasFlow(src, sink)
select src, sink