vcl/source/filter/graphicfilter2.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
New commits: commit 53db174c804a4a378db3a12582d45488020097a3 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jul 5 11:24:52 2017 +0100 coverity#1414484 Division or modulo by zero this looks wrong since initial checkin, why check that xres is non 0 before dividing by yres Change-Id: I5f1c19dadafe561cac8fde4f2bf371587c4ef5f0 Reviewed-on: https://gerrit.libreoffice.org/39573 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx index 377111166f25..51ef11b62455 100644 --- a/vcl/source/filter/graphicfilter2.cxx +++ b/vcl/source/filter/graphicfilter2.cxx @@ -587,12 +587,10 @@ bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, bool bExtendedInfo ) if ( cByte ) { if ( nXRes ) - aLogSize.Width() = ( aPixSize.Width() * 100000 ) / - nTemp32; + aLogSize.Width() = (aPixSize.Width() * 100000) / nXRes; if ( nYRes ) - aLogSize.Height() = ( aPixSize.Height() * 100000 ) / - nTemp32; + aLogSize.Height() = (aPixSize.Height() * 100000) / nYRes; } } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits