[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source
Katarina Machalkova
bubli at kemper.freedesktop.org
Thu May 19 08:55:09 PDT 2011
sc/source/filter/excel/xiname.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit b1ad6ec86661730b5dcd787bc7a0b5337a3c6eb7
Author: Katarina Machalkova <kmachalkova at suse.cz>
Date: Thu May 19 16:21:52 2011 +0200
Fix for fdo#37322 (binary import crash)
Avoid retrieving defined name items on positions >= maNameList.size()
(boost::ptr_vector doesn't like it)
Signed-off-by: Kohei Yoshida <kyoshida at novell.com>
Signed-off-by: Michael Meeks <michael.meeks at novell.com>
Signed-off-by: Noel Power <noel.power at novell.com>
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx
index 15bf618..90be4dc 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -271,7 +271,7 @@ const XclImpName* XclImpNameManager::FindName( const String& rXclName, SCTAB nSc
const XclImpName* XclImpNameManager::GetName( sal_uInt16 nXclNameIdx ) const
{
DBG_ASSERT( nXclNameIdx > 0, "XclImpNameManager::GetName - index must be >0" );
- return &(maNameList.at( nXclNameIdx - 1 ));
+ return ( nXclNameIdx >= maNameList.size() ) ? NULL : &(maNameList.at( nXclNameIdx - 1 ));
}
// ============================================================================
More information about the Libreoffice-commits
mailing list