mirror of
https://github.com/Z3Prover/z3
synced 2025-07-18 02:16:40 +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
|
@ -1916,7 +1916,7 @@ br_status seq_rewriter::mk_str_itos(expr* a, expr_ref& result) {
|
|||
rational r;
|
||||
if (m_autil.is_numeral(a, r)) {
|
||||
if (r.is_int() && !r.is_neg()) {
|
||||
result = str().mk_string(symbol(r.to_string().c_str()));
|
||||
result = str().mk_string(symbol(r.to_string()));
|
||||
}
|
||||
else {
|
||||
result = str().mk_string(symbol(""));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue