diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-03-20 01:49:23 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-03-20 15:49:25 +0100 |
commit | 96926d2f2f90ad8b0aadbc0f5e915abbce6a2518 (patch) | |
tree | f9c27147ebae1d649baff9c14bcc208fb48f0f55 | |
parent | b987b1032c123aef4c087d1c3927bc80729a89ae (diff) |
don't crash with possibly invalid index, fdo#76209
Change-Id: Idde31b2b07e27a1d9c91145516f8e78c638ce3b4
-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 6ae1dddfb1ca..14391ba2f3c4 100644 --- a/sc/source/filter/excel/xiname.cxx +++ b/sc/source/filter/excel/xiname.cxx @@ -301,7 +301,7 @@ const XclImpName* XclImpNameManager::FindName( const OUString& rXclName, SCTAB n const XclImpName* XclImpNameManager::GetName( sal_uInt16 nXclNameIdx ) const { OSL_ENSURE( nXclNameIdx > 0, "XclImpNameManager::GetName - index must be >0" ); - return ( nXclNameIdx > maNameList.size() ) ? NULL : &(maNameList.at( nXclNameIdx - 1 )); + return ( nXclNameIdx <= 0 || nXclNameIdx > maNameList.size() ) ? NULL : &(maNameList.at( nXclNameIdx - 1 )); } void XclImpNameManager::ConvertAllTokens() |