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

Caolán McNamara caolanm at redhat.com
Wed Apr 15 01:43:36 PDT 2015


 sc/source/filter/excel/xelink.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit cee6eb254fae1012bc6ffe1b2e440fe58fedac1b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 15 09:41:10 2015 +0100

    fix col limit crash on export of ooo103315-1.ods to xls
    
    Change-Id: Ic68ddc56d9cf9dd410c1f073ba83bfeea8220bf0

diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 9ea0822..87b7251 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1367,7 +1367,8 @@ bool XclExpXct::BuildCrnList( XclExpCrnList& rCrnRecs )
     for( SCROW nScRow = nScRow1; bValid && (nScRow <= nScRow2); ++nScRow )
     {
         ::std::pair< SCCOL, SCCOL > aColRange = mxCacheTable->getColRange( nScRow );
-        for( SCCOL nScCol = aColRange.first; bValid && (nScCol < aColRange.second); ++nScCol )
+        const SCCOL nScEnd = ::std::min( aColRange.second, MAXCOLCOUNT );
+        for( SCCOL nScCol = aColRange.first; bValid && (nScCol < nScEnd); ++nScCol )
         {
             if( maUsedCells.IsCellMarked( nScCol, nScRow, true ) )
             {


More information about the Libreoffice-commits mailing list