mirror of
https://github.com/Z3Prover/z3
synced 2025-12-13 07:06:23 +00:00
fix a couple hundred deref-after-free bugs due to .c_str() on a temporary string
This commit is contained in:
parent
48a9defb0d
commit
23e6adcad3
64 changed files with 248 additions and 229 deletions
|
|
@ -405,7 +405,8 @@ private:
|
|||
}
|
||||
}
|
||||
func_decl_ref f(m);
|
||||
f = m.mk_fresh_func_decl(m_name.str().c_str(), "", sorts1.size(), sorts1.c_ptr(), m.mk_bool_sort());
|
||||
auto str = m_name.str();
|
||||
f = m.mk_fresh_func_decl(str.c_str(), "", sorts1.size(), sorts1.c_ptr(), m.mk_bool_sort());
|
||||
m_fresh_predicates.push_back(f);
|
||||
return app_ref(m.mk_app(f, args.size(), args.c_ptr()), m);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue