tdf#96197 i18npool: don't read beyond end of string
Asserts on loading ooo100660-1.odg.
(regression from 441fded7f7
)
Change-Id: I6821490e4ca6100da173ed19329a808867d2193d
This commit is contained in:
parent
228a0a8025
commit
0c44f702a0
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue