FlowDroid icon indicating copy to clipboard operation
FlowDroid copied to clipboard

NP Exception in RecursivePathBuilder

Open notify-bibi opened this issue 2 years ago • 1 comments

        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());
				}
			}
		}
                ....
	}


notify-bibi avatar Jan 18 '23 07:01 notify-bibi

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.

t1mlange avatar Jan 20 '23 21:01 t1mlange