summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-11 09:55:13 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-11 15:22:07 +0000
commit00e3da56f2a0698b20b3f72317bfe07f870556f8 (patch)
tree8b546ebbffda1afc41606515777a9c062ea49abe /svl
parent36c853d20feb9c562dc08e59b1c9fcbf1a755329 (diff)
coverity#1242875 Use of untrusted scalar value
Change-Id: I923fac826d5495af7caaa709dd2e844d8714c80b
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/poolio.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 7055f2ba6dc5..b86d25a4facb 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -1331,10 +1331,15 @@ sal_uInt16 SfxItemPool::GetNewWhich
SfxPoolVersion_ImplPtr pVerInfo = pImp->aVersions[nMap];
if ( pVerInfo->_nVer > pImp->nLoadingVersion )
{
- DBG_ASSERT( nFileWhich >= pVerInfo->_nStart &&
- nFileWhich <= pVerInfo->_nEnd,
- "which-id unknown in version" );
- nFileWhich = pVerInfo->_pMap[nFileWhich - pVerInfo->_nStart];
+ if (nFileWhich >= pVerInfo->_nStart &&
+ nFileWhich <= pVerInfo->_nEnd)
+ {
+ nFileWhich = pVerInfo->_pMap[nFileWhich - pVerInfo->_nStart];
+ }
+ else
+ {
+ SAL_WARN("svl.items", "which-id unknown in version");
+ }
}
}
}