Kaydet (Commit) 911faa4d authored tarafından ᚉᚐᚑᚂᚐᚅ McNamara's avatar ᚉᚐᚑᚂᚐᚅ McNamara Kaydeden (comit) Caolán McNamara

coverity#1242844 Untrusted loop bound

Change-Id: I64a805503d0c044b5c5a80df1513e35df5c39171
üst d49755ba
......@@ -673,8 +673,11 @@ bool TBCCDData::Read( SvStream &rS)
{
nOffSet = rS.Tell();
rS.ReadInt16( cwstrItems );
if ( cwstrItems )
if (cwstrItems > 0)
{
//each WString is at least one byte
if (rS.remainingSize() < static_cast<size_t>(cwstrItems))
return false;
for( sal_Int32 index=0; index < cwstrItems; ++index )
{
WString aString;
......
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