diff options
author | Katarina Machalkova <kmachalkova@suse.cz> | 2011-05-19 16:21:52 +0200 |
---|---|---|
committer | Katarina Machalkova <kmachalkova@suse.cz> | 2011-05-19 17:51:13 +0200 |
commit | b1ad6ec86661730b5dcd787bc7a0b5337a3c6eb7 (patch) | |
tree | ffdd4dcc292c41c141dc0f5183856fe94a4e7f2d | |
parent | 70af08e849a93d56915b7abe14537facf1022a6a (diff) |
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@novell.com>
Signed-off-by: Michael Meeks <michael.meeks@novell.com>
Signed-off-by: Noel Power <noel.power@novell.com>
-rw-r--r-- | sc/source/filter/excel/xiname.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx index 15bf618d8..90be4dc02 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 )); } // ============================================================================ |