[Libreoffice-commits] core.git: sc/source

Caolán McNamara caolanm at redhat.com
Thu Nov 9 08:51:35 UTC 2017


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

New commits:
commit cd0b749cc4b4f268d26639fb3c6cbf2128b2d7df
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 8 17:05:59 2017 +0000

    ofz: bad mnRangeOpPosInSymbol
    
    Change-Id: Ieae5a81a1b475fd56cce76c43dab11c2d9fcbe6c
    Reviewed-on: https://gerrit.libreoffice.org/44498
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 7bad98fe742e..68d1f3148135 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2670,6 +2670,8 @@ Label_MaskStateMachine:
         {
             SetError( FormulaError::StringOverflow );
             nLen = MAXSTRLEN-1;
+            if (mnRangeOpPosInSymbol > nLen)
+                mnRangeOpPosInSymbol = -1;
         }
         lcl_UnicodeStrNCpy( cSymbol, aSymbol.getStr(), nLen );
         pSym = &cSymbol[nLen];


More information about the Libreoffice-commits mailing list