Kaydet (Commit) 3e8a695b authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#982431 Division or modulo by float zero

Change-Id: Icb43cae170b8ca5dc3ef3379136d265869eb978e
üst af6811b3
...@@ -230,6 +230,11 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) ...@@ -230,6 +230,11 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{ {
short nXNum = 0, nXDenom = 0, nYNum = 0, nYDenom = 0; short nXNum = 0, nXDenom = 0, nYNum = 0, nYDenom = 0;
pWMF->ReadInt16( nYDenom ).ReadInt16( nYNum ).ReadInt16( nXDenom ).ReadInt16( nXNum ); pWMF->ReadInt16( nYDenom ).ReadInt16( nYNum ).ReadInt16( nXDenom ).ReadInt16( nXNum );
if (!nYDenom || !nXDenom)
{
pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR );
break;
}
pOut->ScaleWinExt( (double)nXNum / nXDenom, (double)nYNum / nYDenom ); pOut->ScaleWinExt( (double)nXNum / nXDenom, (double)nYNum / nYDenom );
} }
break; break;
......
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