mirror of
https://github.com/Z3Prover/z3
synced 2025-08-21 10:41:35 +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
|
@ -58,7 +58,8 @@ struct pattern_validation_functor {
|
|||
void operator()(app * n) {
|
||||
func_decl * decl = to_app(n)->get_decl();
|
||||
if (is_forbidden(decl)) {
|
||||
warning_msg("(%d,%d): '%s' cannot be used in patterns.", m_line, m_pos, decl->get_name().str().c_str());
|
||||
auto str = decl->get_name().str();
|
||||
warning_msg("(%d,%d): '%s' cannot be used in patterns.", m_line, m_pos, str.c_str());
|
||||
m_result = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue