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

Caolán McNamara caolanm at redhat.com
Thu Nov 9 09:49:07 UTC 2017


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

New commits:
commit f17640a95b4c65809f8573c778a293c836a847cd
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/44499
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 278f69f42f19..ee014534b977 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2681,6 +2681,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