Buffer size calculation correction

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2011-03-31 13:11:14 +00:00
parent 4ac8367504
commit a3c125765f

View File

@ -10421,8 +10421,8 @@ bool wxRichTextImageBlock::WriteHex(wxOutputStream& stream)
return true;
int bufSize = 100000;
if (int(m_dataSize+1) < bufSize)
bufSize = m_dataSize;
if (int(2*m_dataSize) < bufSize)
bufSize = 2*m_dataSize;
char* buf = new char[bufSize+1];
int left = m_dataSize;