X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8337ae1e4071eef441b39bc91cdb2391225f30f9..c81394808bf7efd84e4294e44a9a9a7b7f6dd8a9:/src/richtext/richtextbuffer.cpp diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index c0c9e9345f..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; + if (int(2*m_dataSize) < bufSize) + bufSize = 2*m_dataSize; char* buf = new char[bufSize+1]; int left = m_dataSize;