mirror of
https://github.com/Z3Prover/z3
synced 2025-08-25 04:26:00 +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
|
@ -40,7 +40,7 @@ public:
|
|||
for (unsigned i = 0; i < N; ++i) {
|
||||
std::stringstream strm;
|
||||
strm << "b" << i;
|
||||
vars.push_back(m.mk_const(symbol(strm.str().c_str()), m.mk_bool_sort()));
|
||||
vars.push_back(m.mk_const(symbol(strm.str()), m.mk_bool_sort()));
|
||||
std::cout << "(declare-const " << strm.str() << " Bool)\n";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue