From a3c125765f5cd27cd172e16de9cad3d17bc5b3d0 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 31 Mar 2011 13:11:14 +0000 Subject: [PATCH] Buffer size calculation correction git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.45.2