mirror of
https://github.com/Z3Prover/z3
synced 2025-06-29 01:18:45 +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
|
@ -1656,7 +1656,7 @@ void cmd_context::display_model(model_ref& mdl) {
|
|||
if (p.v1() || p.v2()) {
|
||||
std::ostringstream buffer;
|
||||
model_v2_pp(buffer, *mdl, false);
|
||||
regular_stream() << "\"" << escaped(buffer.str().c_str(), true) << "\"" << std::endl;
|
||||
regular_stream() << '"' << escaped(buffer.str(), true) << '"' << std::endl;
|
||||
} else {
|
||||
regular_stream() << "(model " << std::endl;
|
||||
model_smt2_pp(regular_stream(), *this, *mdl, 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue