Kaydet (Commit) 087162b7 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Eike Rathke

fix infinite loop in text search, tdf#99208

Change-Id: If77055d6b292d5126165252d7198e8abf9d2c44d
Reviewed-on: https://gerrit.libreoffice.org/24029Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
üst 34806c91
......@@ -726,7 +726,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32
bool bMightBeWord = true;
bool bMightBeWordLast = true;
//! All the variables above (plus ParseResult) have to be resetted on ssRewindFromValue!
sal_Int32 nextCharIndex(0); // == index of nextChar
sal_Int32 nextCharIndex(nPos); // == index of nextChar
while ((current != 0) && (eState != ssStop))
{
......@@ -965,7 +965,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32
r = ParseResult();
index = nPos;
postSymbolIndex = nPos;
nextCharIndex = 0;
nextCharIndex = nPos;
aSymbol.clear();
current = (index < rText.getLength()) ? rText.iterateCodePoints(&index) : 0;
nCodePoints = (nPos < rText.getLength()) ? 1 : 0;
......
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