diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-04-15 09:41:10 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-04-23 15:33:34 +0200 |
commit | 505920b3e959dec5fb2afc83246b5f495fe318f5 (patch) | |
tree | e60c1052cd1ab9c56ef1b5d741dd3ca1d93da5dc /sc | |
parent | aa7ae43b882b116ba8f4b9b4610ff35ca903d755 (diff) |
fix col limit crash on export of ooo103315-1.ods to xls
Change-Id: Ic68ddc56d9cf9dd410c1f073ba83bfeea8220bf0
(cherry picked from commit cee6eb254fae1012bc6ffe1b2e440fe58fedac1b)
Reviewed-on: https://gerrit.libreoffice.org/15318
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xelink.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx index 3c8dffcd483f..31864123efd5 100644 --- a/sc/source/filter/excel/xelink.cxx +++ b/sc/source/filter/excel/xelink.cxx @@ -1345,7 +1345,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 ) ) { |