3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-31 16:33:18 +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

@ -126,6 +126,7 @@ public:
explicit parameter(rational && r) : m_kind(PARAM_RATIONAL), m_rational(alloc(rational, std::move(r))) {}
explicit parameter(double d):m_kind(PARAM_DOUBLE), m_dval(d) {}
explicit parameter(const char *s):m_kind(PARAM_SYMBOL), m_symbol(symbol(s)) {}
explicit parameter(const std::string &s):m_kind(PARAM_SYMBOL), m_symbol(symbol(s)) {}
explicit parameter(unsigned ext_id, bool):m_kind(PARAM_EXTERNAL), m_ext_id(ext_id) {}
parameter(parameter const&);
@ -984,6 +985,7 @@ struct builtin_name {
decl_kind m_kind;
symbol m_name;
builtin_name(char const * name, decl_kind k) : m_kind(k), m_name(name) {}
builtin_name(const std::string &name, decl_kind k) : m_kind(k), m_name(name) {}
};
/**