mirror of
https://github.com/Z3Prover/z3
synced 2025-06-29 09:28:45 +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
|
@ -24,6 +24,7 @@ Revision History:
|
|||
|
||||
#include "ast/ast.h"
|
||||
#include "ast/bv_decl_plugin.h"
|
||||
#include <string>
|
||||
|
||||
#define Z3_USE_UNICODE 0
|
||||
|
||||
|
@ -121,11 +122,10 @@ public:
|
|||
static unsigned max_char() { return 196607; }
|
||||
zstring() {}
|
||||
zstring(char const* s);
|
||||
zstring(const std::string &str) : zstring(str.c_str()) {}
|
||||
zstring(unsigned sz, unsigned const* s) { m_buffer.append(sz, s); SASSERT(well_formed()); }
|
||||
zstring(zstring const& other): m_buffer(other.m_buffer) {}
|
||||
zstring(unsigned num_bits, bool const* ch);
|
||||
zstring(unsigned ch);
|
||||
zstring& operator=(zstring const& other);
|
||||
zstring replace(zstring const& src, zstring const& dst) const;
|
||||
zstring reverse() const;
|
||||
std::string encode() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue