diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 09:59:44 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 11:10:59 +0000 |
commit | 3e8a695b588eff13155f8dd1f7c4afaba7954d0f (patch) | |
tree | b9b9f035b753db8300285fd3b830cee35aec86ed /vcl | |
parent | af6811b3d0aff8f2823b420e07218338dcb49911 (diff) |
coverity#982431 Division or modulo by float zero
Change-Id: Icb43cae170b8ca5dc3ef3379136d265869eb978e
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/wmf/winwmf.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index 61cba73c5564..21f3516a1c88 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -230,6 +230,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->ScaleWinExt( (double)nXNum / nXDenom, (double)nYNum / nYDenom ); } break; |