Kaydet (Commit) 0c44f702 authored tarafından Michael Stahl's avatar Michael Stahl

tdf#96197 i18npool: don't read beyond end of string

Asserts on loading ooo100660-1.odg.

(regression from 441fded7)

Change-Id: I6821490e4ca6100da173ed19329a808867d2193d
üst 228a0a80
......@@ -116,7 +116,8 @@ LineBreakResults SAL_CALL BreakIterator_CJK::getLineBreak(
}
// Prevent cutting Korean words in the middle.
if ( nOldStartPos == nStartPos && isHangul( Text[nStartPos] ) )
if (nOldStartPos == nStartPos && nStartPos < Text.getLength()
&& isHangul(Text[nStartPos]))
{
while ( nStartPos >= 0 && isHangul( Text[nStartPos] ) )
--nStartPos;
......
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