vcl/source/gdi/pdfextoutdevdata.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 32aae380b02de10a433e633186de7fcb85511530 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Jan 14 10:17:30 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Jan 14 14:51:31 2021 +0100 cid#1471674 help coverity see that "Division or modulo by zero" is bogus Change-Id: I82fc94d242e446d434c257471e80a6db2536e8aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109267 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index da7e78dcbcd9..8ba808e21579 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -839,7 +839,8 @@ bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic, // wanted. return false; - if (rGraphic.GetGfxLink().GetDataSize() == 0) + auto nSize = rGraphic.GetGfxLink().GetDataSize(); + if (nSize == 0) return false; GfxLink aLink = rGraphic.GetGfxLink(); @@ -862,7 +863,7 @@ bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic, // FIXME: ideally we'd also pre-empt the DPI related scaling too. sal_Int32 nCurrentRatio = (100 * aSize.Width() * aSize.Height() * 4) / - rGraphic.GetGfxLink().GetDataSize(); + nSize; static const struct { sal_Int32 mnQuality; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits