Skip to content

Commit 780aa52

Browse files
NathanJPhillipssmowton
authored andcommitted
Merge pull request diffblue#119 from trtikm/bugfix/add-token
Fix adding new taint tokens
1 parent ea39c74 commit 780aa52

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/goto-analyzer/taint_rules.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ boost::optional<taint_rulet::tainted_locationt> taint_rulet::tainted_locationt::
114114
<< messaget::eom;
115115
return boost::none;
116116
}
117-
taint_tokent token = taint_tokent::fresh();
118-
tokens.left.insert({ taint_string, token });
117+
// Try to add a new token, get the token added or already in the set
118+
taint_tokent token =
119+
tokens.left.insert({ taint_string, taint_tokent::fresh() }).first->second;
119120
return tainted_locationt(location, token, json["dereference"].is_true());
120121
}
121122

0 commit comments

Comments
 (0)