mirror of
https://github.com/Z3Prover/z3
synced 2026-02-27 02:25:38 +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
|
|
@ -1083,7 +1083,7 @@ namespace qe {
|
|||
for (expr * x : m_idxs[0].idx) {
|
||||
std::stringstream name;
|
||||
name << "get" << (i++);
|
||||
acc.push_back(mk_accessor_decl(m, symbol(name.str().c_str()), type_ref(m.get_sort(x))));
|
||||
acc.push_back(mk_accessor_decl(m, symbol(name.str()), type_ref(m.get_sort(x))));
|
||||
}
|
||||
constructor_decl* constrs[1] = { mk_constructor_decl(symbol("tuple"), symbol("is-tuple"), acc.size(), acc.c_ptr()) };
|
||||
datatype::def* dts = mk_datatype_decl(dt, symbol("tuple"), 0, nullptr, 1, constrs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue