mirror of
https://github.com/github/codeql.git
synced 2026-01-09 12:40:25 +01:00
68014fd3bf means that more accessors are properly
extracted, and consequently the calls to `get_Item` in the test have more dispatch
targets. Increasing `fieldFlowBranchLimit` makes the test pass again.
26 lines
638 B
Plaintext
26 lines
638 B
Plaintext
/**
|
|
* @kind path-problem
|
|
*/
|
|
|
|
import csharp
|
|
import DataFlow::PathGraph
|
|
|
|
class Conf extends DataFlow::Configuration {
|
|
Conf() { this = "ArrayFlowConf" }
|
|
|
|
override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof ObjectCreation }
|
|
|
|
override predicate isSink(DataFlow::Node sink) {
|
|
exists(MethodCall mc |
|
|
mc.getTarget().hasName("Sink") and
|
|
mc.getAnArgument() = sink.asExpr()
|
|
)
|
|
}
|
|
|
|
override int fieldFlowBranchLimit() { result = 10 }
|
|
}
|
|
|
|
from DataFlow::PathNode source, DataFlow::PathNode sink, Conf conf
|
|
where conf.hasFlowPath(source, sink)
|
|
select source, source, sink, "$@", sink, sink.toString()
|