coverity#982431 Division or modulo by float zero

and

coverity#982432 Division or modulo by float zero

Change-Id: I1b9036d85c4b31b8136a96d330d95d7b024530aa
This commit is contained in:
Caolán McNamara
2015-01-25 15:04:48 +00:00
parent e3c70196e7
commit 2b95714814

View File

@@ -250,6 +250,11 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
short nXNum = 0, nXDenom = 0, nYNum = 0, nYDenom = 0;
pWMF->ReadInt16( nYDenom ).ReadInt16( nYNum ).ReadInt16( nXDenom ).ReadInt16( nXNum );
if (!nYDenom || !nXDenom)
{
pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR );
break;
}
pOut->ScaleDevExt( (double)nXNum / nXDenom, (double)nYNum / nYDenom );
}
break;