mirror of
https://github.com/Z3Prover/z3
synced 2025-06-21 21:33:39 +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
|
@ -191,7 +191,7 @@ extern "C" {
|
|||
if (ok && r.is_int() && !r.is_neg()) {
|
||||
std::stringstream strm;
|
||||
r.display_bin(strm, r.get_num_bits());
|
||||
return mk_c(c)->mk_external_string(strm.str().c_str());
|
||||
return mk_c(c)->mk_external_string(strm.str());
|
||||
}
|
||||
else {
|
||||
SET_ERROR_CODE(Z3_INVALID_ARG, nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue