Skip to content

Commit 1b2dc24

Browse files
committed
rebase onto master, rename test folder, small change
- in base, the tainted set is filtered, so that completely new values from callee are not in the tainted set and copied again
1 parent 09a4052 commit 1b2dc24

File tree

12 files changed

+2
-0
lines changed

12 files changed

+2
-0
lines changed

src/analyses/base.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2302,6 +2302,8 @@ struct
23022302
(* add variables from callee that are not in caller yet *)
23032303
let cpa_new = CPA.filter (fun x _ -> not (CPA.mem x cpa_caller)) cpa_noreturn in
23042304
let cpa_caller' = CPA.fold CPA.add cpa_new cpa_caller in
2305+
(* remove lvals from the tainted set that correspond to variables for which we just added a new mapping from the callee*)
2306+
let tainted = Q.LS.filter (fun (v, _) -> not (CPA.mem v cpa_new)) tainted in
23052307
let st_combined = combine_st ctx {st with cpa = cpa_caller'} fun_st tainted in
23062308
if M.tracing then M.trace "taintPC" "combined: %a\n" CPA.pretty st_combined.cpa;
23072309
{ fun_st with cpa = st_combined.cpa }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)