Example #1
0
 private void processReachables() {
   reachableMethods.update();
   while (reachablesReader.hasNext()) {
     MethodOrMethodContext m = (MethodOrMethodContext) reachablesReader.next();
     MethodPAG mpag = MethodPAG.v(pag, m.method());
     mpag.build();
     mpag.addToPAG(m.context());
   }
 }
Example #2
0
  /** Count taint on prims or strings */
  private static Set<InfoValue> getTaintSet(Value v, MethodOrMethodContext momc) {
    Set<InfoValue> taints = null;

    if (v instanceof Local && v.getType() instanceof PrimType) {
      taints = InformationFlowAnalysis.v().getTaints(momc, (Local) v);
    } else if (PTABridge.v().isPointer(v) && SootUtils.isStringOrSimilarType(v.getType())) {
      taints = new HashSet<InfoValue>();
      for (IAllocNode node : PTABridge.v().getPTSet(v, momc.context())) {
        taints.addAll(InformationFlowAnalysis.v().getTaints(node, momc));
      }
    }

    return taints;
  }