starmath/source/mathtype.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 86b79ea1f6afb709f2de8141810a61e4162e3125 Author: Jan Holesovsky <ke...@collabora.com> Date: Sat Nov 2 00:19:29 2013 +0100 starmath: Check for text length. Fixes fdo32667-1.doc. Change-Id: Ibe7a9ca83b65e7b13c6b315f1b771f50f0b6fc7a diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 58053e4..d8c93ef 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -606,9 +606,9 @@ int MathType::Parse(SotStorage *pStor) static void lcl_PrependDummyTerm(OUString &rRet, sal_Int32 &rTextStart) { - if ((rRet[rTextStart] == '=') && - ((rTextStart == 0) || - (rRet[ rTextStart-1 ] == '{')) + if ((rTextStart < rRet.getLength()) && + (rRet[rTextStart] == '=') && + ((rTextStart == 0) || (rRet[ rTextStart-1 ] == '{')) ) { rRet = rRet.replaceAt(rTextStart,0," {}"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits