Kaydet (Commit) 9649cb57 authored tarafından Caolán McNamara's avatar Caolán McNamara

avoid out of bounds string access

as demonstrated by ooo109591-1.doc

Change-Id: I91b4940828038561885e8d3a109c40a668aeb15b
üst d4d56060
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment