3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-03 09:50:23 +00:00

fix a couple hundred deref-after-free bugs due to .c_str() on a temporary string

This commit is contained in:
Nuno Lopes 2020-07-11 20:24:45 +01:00
parent 48a9defb0d
commit 23e6adcad3
64 changed files with 248 additions and 229 deletions

View file

@ -251,7 +251,8 @@ namespace opt {
m_msolver = mk_sortmax(m_c, m_weights, m_soft_constraints);
}
else {
warning_msg("solver %s is not recognized, using default 'maxres'", maxsat_engine.str().c_str());
auto str = maxsat_engine.str();
warning_msg("solver %s is not recognized, using default 'maxres'", str.c_str());
m_msolver = mk_maxres(m_c, m_index, m_weights, m_soft_constraints);
}