[quandary] passing actuals to the sink-determining code

Differential Revision: D4012216

fbshipit-source-id: 86e8aca
master
Sam Blackshear 8 years ago committed by Facebook Github Bot
parent 61f420b941
commit 6aee686cb2

@ -121,7 +121,7 @@ module CppSink = struct
let make kind site =
{ kind; site; }
let get site =
let get site _ =
match CallSite.pname site with
| (Procname.ObjC_Cpp cpp_pname) as pname ->
begin

@ -136,7 +136,7 @@ module JavaSink = struct
let make kind site =
{ kind; site; }
let get site =
let get site _ =
(* taint all the inputs of [pname]. for non-static procedures, taints the "this" parameter only
if [taint_this] is true. *)
let taint_all ?(taint_this=false) pname kind site ~report_reachable =

@ -25,5 +25,6 @@ module type S = sig
val to_callee : t -> CallSite.t -> t
val get : CallSite.t -> t parameter list
(** return the parameter index and sink kind for the given call site with the given actuals *)
val get : CallSite.t -> (Exp.t * Typ.t) list -> t parameter list
end

@ -301,7 +301,7 @@ module Make (TaintSpec : TaintSpec.S) = struct
let call_site = CallSite.make callee_pname callee_loc in
let astate_with_sink =
match TraceDomain.Sink.get call_site with
match TraceDomain.Sink.get call_site actuals with
| [] -> astate
| sinks -> add_sinks sinks actuals astate proc_data callee_loc in

@ -49,7 +49,7 @@ module MockTrace = Trace.Make(struct
module Sink = struct
include MockTraceElem
let get site =
let get site _ =
if string_is_prefix "SINK" (Procname.to_string (CallSite.pname site))
then [Sink.make_sink_param site 0 ~report_reachable:false]
else []

Loading…
Cancel
Save