summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-11-04 19:35:44 +0100
committerDavid Tardon <dtardon@redhat.com>2014-11-04 19:52:53 +0100
commitc7ba28eaa766f2c1d4f0d3b25b40dd40777bc66b (patch)
tree5d0b0a7054c10900a4830d4f7ee99075422d2127 /sw
parent025da16223a28263059d9d02be276459dcc9ca75 (diff)
coverity#1242845 use of untrusted scalar
Change-Id: I25712384f1633506c047667606b4bc254e2ff04b
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/config/uinums.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx
index 40de91d8d00c..107ce2a9cb6f 100644
--- a/sw/source/uibase/config/uinums.cxx
+++ b/sw/source/uibase/config/uinums.cxx
@@ -398,7 +398,8 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
{
sal_uInt16 nWhich, nVers;
rStream.ReadUInt16( nWhich ).ReadUInt16( nVers );
- aItems.push_back( GetDfltAttr( nWhich )->Create( rStream, nVers ) );
+ if ( ( nWhich >= POOLATTR_BEGIN ) && ( nWhich < POOLATTR_END ) )
+ aItems.push_back( GetDfltAttr( nWhich )->Create( rStream, nVers ) );
}
}