summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-20 09:51:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-20 10:57:14 +0100
commit1361dfc0aa835dcb134d5de4bac594519aa16efe (patch)
tree08cdbc25db499c2c8ee51736b1095d31687554d0 /filter
parente3dc8cb177a3ab6a4fb47018763a08ada8eccaf9 (diff)
coverity#1242606 Untrusted loop bound
Change-Id: Iafa03d4dd65eb343a80996880bc1ed846d1b7491
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/svdfppt.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index fba076a2aa89..afa3b14358a0 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3846,7 +3846,7 @@ PPTParaSheet::PPTParaSheet( const PPTParaSheet& rSheet )
*this = rSheet;
}
-void PPTParaSheet::Read( SdrPowerPointImport&
+bool PPTParaSheet::Read( SdrPowerPointImport&
#ifdef DBG_UTIL
rManager
#endif
@@ -3903,6 +3903,8 @@ void PPTParaSheet::Read( SdrPowerPointImport&
{
// number of tabulators
rIn.ReadUInt16( nVal16 );
+ if (rIn.remainingSize() / sizeof(nVal32) < nVal16)
+ return false;
for ( i = 0; i < nVal16; i++ )
rIn.ReadUInt32( nVal32 ); // reading the tabulators
}
@@ -3973,6 +3975,7 @@ void PPTParaSheet::Read( SdrPowerPointImport&
}
nPMask >>= 1;
}
+ return false;
}
void PPTParaSheet::UpdateBulletRelSize( sal_uInt32 nLevel, sal_uInt16 nFontHeight )