X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4dc7ae1ae8af4415c54a4fe949ebd7f3489293b9..c81394808bf7efd84e4294e44a9a9a7b7f6dd8a9:/src/richtext/richtextbuffer.cpp diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index ce0f18c004..c095af9c78 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -10421,8 +10421,8 @@ bool wxRichTextImageBlock::WriteHex(wxOutputStream& stream) return true; int bufSize = 100000; - if (int(m_dataSize+1) < bufSize) - bufSize = m_dataSize+1; + if (int(2*m_dataSize) < bufSize) + bufSize = 2*m_dataSize; char* buf = new char[bufSize+1]; int left = m_dataSize;