[Libreoffice-commits] core.git: Branch 'libreoffice-5-4-4' - sc/source

Eike Rathke erack at redhat.com
Tue Dec 12 15:03:01 UTC 2017


 sc/source/core/tool/compiler.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7f1f7a057f5a9348507ea684271104cfbb9d0c66
Author: Eike Rathke <erack at redhat.com>
Date:   Sat Dec 2 15:32:06 2017 +0100

    ofz#4484 another stab at mnRangeOpPosInSymbol
    
    Commit cd0b749cc4b4f268d26639fb3c6cbf2128b2d7df still missed it by
    one position behind string length.
    
    Also move the check to end of i18n symbol parsing for all
    constellations.
    
     Conflicts:
            sc/source/core/tool/compiler.cxx
    
    Change-Id: I7b5e1375fe711dcc3f659e558702de78893d25a5
    Reviewed-on: https://gerrit.libreoffice.org/45720
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 62200282b2f0..b795802affb6 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2683,9 +2683,9 @@ Label_MaskStateMachine:
         {
             SetError( FormulaError::StringOverflow );
             nLen = MAXSTRLEN-1;
-            if (mnRangeOpPosInSymbol > nLen)
-                mnRangeOpPosInSymbol = -1;
         }
+        if (mnRangeOpPosInSymbol >= nLen)
+            mnRangeOpPosInSymbol = -1;
         lcl_UnicodeStrNCpy( cSymbol, aSymbol.getStr(), nLen );
         pSym = &cSymbol[nLen];
     }


More information about the Libreoffice-commits mailing list