A length greater than that of the source string could be passed to this ctor. This worked correctly, i.e. created a string which was a copy of the source one but cached a wrong length for it. Avoid this by explicitly checking the length before caching it in wxString::assign(str, len). See #14130. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775