/** * Extends the taint propagation path with the given abstraction * * @param abs The abstraction to put on the taint propagation path * @return The new taint propagation path If this path would contain a loop, * null is returned instead of the looping path. */ public SourceContextAndPath extendPath(Abstraction abs) { return extendPath(abs, null); }
private boolean processPredecessor(SourceContextAndPath scap, Abstraction pred) { // Put the current statement on the list SourceContextAndPath extendedScap = scap.extendPath(pred, pathConfig); if (extendedScap == null) return false; // Add the new path checkForSource(pred, extendedScap); final int maxPaths = pathConfig.getMaxPathsPerAbstraction(); if (maxPaths > 0) { Set<SourceContextAndPath> existingPaths = pathCache.get(pred); if (existingPaths != null && existingPaths.size() > maxPaths) return false; } return pathCache.put(pred, extendedScap); }
curAbs.getSourceContext().getUserData()).extendPath(curAbs); cacheData.add(sourceAndPath); SourceContextAndPath extendedPath = curScap.extendPath(curAbs, pathConfig); if (extendedPath != null) cacheData.add(extendedPath);
@Override protected Runnable getTaintPathTask(AbstractionAtSink abs) { SourceContextAndPath scap = new SummarySourceContextAndPath(manager, abs.getAbstraction().getAccessPath(), abs.getSinkStmt(), AliasUtils.canAccessPathHaveAliases(abs.getAbstraction().getAccessPath()), abs.getAbstraction().getAccessPath(), new ArrayList<SootMethod>(), context); scap = scap.extendPath(abs.getAbstraction()); if (scap != null) { if (pathCache.put(abs.getAbstraction(), scap)) if (!checkForSource(abs.getAbstraction(), scap)) return new SourceFindingTask(abs.getAbstraction()); } return null; }
SourceContextAndPath extendedScap = scap.extendPath(pred, pathConfig); if (extendedScap == null) return false; SourceContextAndPath extendedScap = scap.extendPath(pred, pathConfig); if (extendedScap == null) return false;
@Override protected Runnable getTaintPathTask(final AbstractionAtSink abs) { SourceContextAndPath scap = new SourceContextAndPath(abs.getSinkDefinition(), abs.getAbstraction().getAccessPath(), abs.getSinkStmt()); scap = scap.extendPath(abs.getAbstraction(), pathConfig); if (pathCache.put(abs.getAbstraction(), scap)) if (!checkForSource(abs.getAbstraction(), scap)) return new SourceFindingTask(abs.getAbstraction()); return null; }
@Override protected Runnable getTaintPathTask(final AbstractionAtSink abs) { SourceContextAndPath scap = new SourceContextAndPath(abs.getSinkDefinition(), abs.getAbstraction().getAccessPath(), abs.getSinkStmt()); scap = scap.extendPath(abs.getAbstraction(), pathConfig); if (pathCache.put(abs.getAbstraction(), scap)) if (!checkForSource(abs.getAbstraction(), scap)) return new SourceFindingTask(abs.getAbstraction()); return null; }