[Libreoffice-commits] .: Branch 'libreoffice-3-3' - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Nov 8 13:35:09 PST 2010
sc/source/filter/excel/frmbase.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 3a06b860b69fdbe25317b44c4b13581bd88e736c
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Mon Nov 8 16:27:37 2010 -0500
Fixed a crash on importing named ranges on higher sheets.
When importing xls document containing named ranges on sheets higher
than 256 (max number of sheets Calc supports currently), Calc would
crash. We need to check for the upper boundary condition before
accessing the array by index to prevent crash. (n#649941)
diff --git a/sc/source/filter/excel/frmbase.cxx b/sc/source/filter/excel/frmbase.cxx
index 1cfc295..868b927 100644
--- a/sc/source/filter/excel/frmbase.cxx
+++ b/sc/source/filter/excel/frmbase.cxx
@@ -104,7 +104,7 @@ void _ScRangeListTabs::Append( ScSingleRefData a, SCsTAB nTab, const BOOL b )
if( nTab < 0)
nTab = a.nTab;
- if( nTab >= 0 )
+ if( nTab >= 0 && nTab <= MAXTAB)
{
_ScRangeList* p = ppTabLists[ nTab ];
@@ -169,7 +169,7 @@ void _ScRangeListTabs::Append( ScComplexRefData a, SCsTAB nTab, const BOOL b )
if( nTab < -1)
nTab = a.Ref1.nTab;
- if( nTab >= 0 )
+ if( nTab >= 0 && nTab <= MAXTAB)
{
_ScRangeList* p = ppTabLists[ nTab ];
More information about the Libreoffice-commits
mailing list