[Libreoffice-commits] .: editeng/source
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Wed Jun 13 05:09:48 PDT 2012
editeng/source/editeng/editdoc.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit a4242df3ae36d9158317298fe01b5cfa0aae4b32
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Jun 13 14:09:38 2012 +0200
Take care of short strings
Change-Id: I469b27a45bb5676570b59a829419f3959210a1a6
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index fe747c3..08722a5 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -68,6 +68,7 @@
#include <tools/shl.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
+#include <cassert>
#include <limits>
#include <boost/bind.hpp>
@@ -2064,6 +2065,8 @@ XubString EditDoc::GetText( LineEnd eEnd ) const
pCur += nSepSize;
}
}
+ assert(pCur - newStr->buffer <= newStr->length);
+ newStr->length = pCur - newStr->buffer;
return rtl::OUString(newStr, SAL_NO_ACQUIRE);
}
More information about the Libreoffice-commits
mailing list