fixed a bug caused by passing a wxChar[] buffer to a function taking a wxString; the buffer was automatically converted but since it was not NULL-terminated, a crash resulted
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -7588,7 +7588,10 @@ bool wxRichTextImageBlock::ReadHex(wxInputStream& stream, int length, wxBitmapTy
|
|||||||
if (m_data)
|
if (m_data)
|
||||||
delete[] m_data;
|
delete[] m_data;
|
||||||
|
|
||||||
wxChar str[2];
|
// create a null terminated temporary string:
|
||||||
|
char str[3];
|
||||||
|
str[2] = '\0';
|
||||||
|
|
||||||
m_data = new unsigned char[dataSize];
|
m_data = new unsigned char[dataSize];
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < dataSize; i ++)
|
for (i = 0; i < dataSize; i ++)
|
||||||
|
Reference in New Issue
Block a user