summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-17 10:14:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-17 15:19:57 +0100
commita4e0107000f26ab56147bf382bb399bcb0981504 (patch)
treec0c05f7d59e34b92d9a9b179a3b2f5dc097b85a1 /svl
parentcf63ebe0f005513c1e989682459bcd0688eb190b (diff)
coverity#1242604 attempt to silence Untrusted loop bound
Change-Id: I034fa25671cce8ba215d7b8b88f0dff5b26d40cb
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zformat.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 983b07550a3c..aa877b8acaec 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -528,8 +528,10 @@ void ImpSvNumFor::SaveNewCurrencyMap( SvStream& rStream ) const
void ImpSvNumFor::LoadNewCurrencyMap( SvStream& rStream )
{
sal_uInt16 nCnt;
- rStream.ReadUInt16( nCnt );
- for ( sal_uInt16 j=0; j<nCnt; j++ )
+ rStream.ReadUInt16(nCnt);
+ if (!nCnt)
+ return;
+ for (sal_uInt16 j=0; j < nCnt; ++j)
{
sal_uInt16 nPos;
short nType;