Kaydet (Commit) b8db01a1 authored tarafından Katarina Machalkova's avatar Katarina Machalkova

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: 's avatarKohei Yoshida <kyoshida@novell.com>
Signed-off-by: 's avatarMichael Meeks <michael.meeks@novell.com>
Signed-off-by: 's avatarNoel Power <noel.power@novell.com>
üst 0747a94b
...@@ -271,7 +271,7 @@ const XclImpName* XclImpNameManager::FindName( const String& rXclName, SCTAB nSc ...@@ -271,7 +271,7 @@ const XclImpName* XclImpNameManager::FindName( const String& rXclName, SCTAB nSc
const XclImpName* XclImpNameManager::GetName( sal_uInt16 nXclNameIdx ) const const XclImpName* XclImpNameManager::GetName( sal_uInt16 nXclNameIdx ) const
{ {
DBG_ASSERT( nXclNameIdx > 0, "XclImpNameManager::GetName - index must be >0" ); DBG_ASSERT( nXclNameIdx > 0, "XclImpNameManager::GetName - index must be >0" );
return &(maNameList.at( nXclNameIdx - 1 )); return ( nXclNameIdx >= maNameList.size() ) ? NULL : &(maNameList.at( nXclNameIdx - 1 ));
} }
// ============================================================================ // ============================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment