FlowDroid
FlowDroid copied to clipboard
NP Exception in RecursivePathBuilder
soot/jimple/infoflow/data/SourceContextAndPath.java:153
public SourceContextAndPath extendPath(Abstraction abs) {
return extendPath(abs, null);
}
soot/jimple/infoflow/data/SourceContextAndPath.java:165
public SourceContextAndPath extendPath(Abstraction abs, InfoflowConfiguration config) {
...
switch (config.getDataFlowDirection()) { // 'java.lang.NullPointerException'
}
....
}
soot.jimple.infoflow.results.InfoflowResults: line 159
public Pair<ResultSourceInfo, ResultSinkInfo> addResult(ISourceSinkDefinition sinkDefinition, AccessPath sink,
Stmt sinkStmt, ISourceSinkDefinition sourceDefinition, AccessPath source, Stmt sourceStmt, Object userData,
List<Abstraction> propagationPath) {
return addResult(sinkDefinition, sink, sinkStmt, sourceDefinition, source, sourceStmt, userData,
propagationPath, null); // NULL Manager
}
public Pair<ResultSourceInfo, ResultSinkInfo> addResult(ISourceSinkDefinition sinkDefinition, AccessPath sink,
Stmt sinkStmt, ISourceSinkDefinition sourceDefinition, AccessPath source, Stmt sourceStmt, Object userData,
List<Abstraction> propagationPath, InfoflowManager manager) {
if (propagationPath != null) {
stmtPath = new ArrayList<>(propagationPath.size());
apPath = new ArrayList<>(propagationPath.size());
if (!manager.getConfig().getPathAgnosticResults()) // 'java.lang.NullPointerException'
csPath = new ArrayList<>(propagationPath.size());
for (Abstraction pathAbs : propagationPath) {
if (pathAbs.getCurrentStmt() != null) {
stmtPath.add(pathAbs.getCurrentStmt());
apPath.add(pathAbs.getAccessPath());
if (csPath != null)
csPath.add(pathAbs.getCorrespondingCallSite());
}
}
}
....
}
Hi,
I already fixed the NPE some time ago. You should be fine by using the most recent commit on develop or the release on maven.