Skip to content

Fix use-after-free bugs in string refinement #939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/goto-programs/string_refine_preprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ void string_refine_preprocesst::make_string_function(
code_function_callt &function_call=to_code_function_call(target->code);
code_typet function_type=to_code_type(function_call.function().type());
code_typet new_type;
const source_locationt &loc=function_call.source_location();
const source_locationt loc=function_call.source_location();
declare_function(function_name, function_type);
function_application_exprt rhs;
std::vector<exprt> args;
Expand Down Expand Up @@ -1074,7 +1074,8 @@ void string_refine_preprocesst::replace_string_calls(
{
if(target->is_function_call())
{
code_function_callt &function_call=to_code_function_call(target->code);
const code_function_callt function_call=
to_code_function_call(target->code);

if(function_call.function().id()==ID_symbol)
{
Expand Down