ofz#907 divide by zero

Change-Id: I663761239efe195b2051cf4410eca2a3362e5de8
This commit is contained in:
Caolán McNamara
2017-03-19 10:22:03 +00:00
parent 47a9523f3f
commit cd3e18c2cf

View File

@@ -2404,7 +2404,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
rIn.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert );
bool bImport = false;
if (nNumElemVert)
if (nNumElemVert && nElemSizeVert)
{
//sanity check that the stream is long enough to fulfill nNumElemVert * nElemSizeVert;
bImport = rIn.remainingSize() / nElemSizeVert >= nNumElemVert;