The fix has several parts: 1. don't free the old string data in ConcatSelf() if we use it as source 2. implement assign() using replace() rather than clear() + append() 3. fix replace() to work with replacement strings containing embedded NULs and optimize it by using memcpy() instead of byte-wise copy git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775