sw/source/core/text/itrform2.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 9649cb574f9416ca4061ebed6f1538438cb55cb0 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Nov 6 14:11:11 2013 +0000 avoid out of bounds string access as demonstrated by ooo109591-1.doc Change-Id: I91b4940828038561885e8d3a109c40a668aeb15b diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 5fa4029..c058849 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -467,7 +467,11 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf ) } } else - bAllowBehind = rCC.isLetterNumeric( rInf.GetTxt(), rInf.GetIdx() ); + { + const OUString& rTxt = rInf.GetTxt(); + sal_Int32 nIdx = rInf.GetIdx(); + bAllowBehind = nIdx < rTxt.getLength() ? rCC.isLetterNumeric(rTxt, nIdx) : false; + } const SwLinePortion* pLast = rInf.GetLast(); if ( bAllowBehind && pLast )
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits