[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - i18npool/source

Markus Mohrhard markus.mohrhard at googlemail.com
Tue Apr 12 16:30:10 UTC 2016


 i18npool/source/characterclassification/cclass_unicode_parser.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c0cbe81caa913fd7bff3a26422b38513020855e7
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Apr 12 16:56:08 2016 +0200

    fix infinite loop in text search, tdf#99208
    
    Change-Id: If77055d6b292d5126165252d7198e8abf9d2c44d
    Reviewed-on: https://gerrit.libreoffice.org/24029
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 087162b7142cf666478986461cdfa15c3d7fe382)
    Reviewed-on: https://gerrit.libreoffice.org/24033

diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index c003959..2a6f954 100644
--- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
@@ -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;


More information about the Libreoffice-commits mailing list