[Libreoffice-commits] core.git: lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Sat Jan 13 14:43:37 UTC 2018
lotuswordpro/source/filter/lwpgrfobj.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 0ebbcec217a9774874f8880171474e0dc710f27a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jan 13 14:41:04 2018 +0000
ofz#5281 Divide-by-zero
Change-Id: I8ce33727901def27b12981281de6cb011e9f14f3
diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx
index 6e737a2fba16..5bcc918187d2 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -557,6 +557,8 @@ void LwpGraphicObject::CreateGrafObject()
bool sal_bCropped = false;
if (fSclGrafWidth > fDisFrameWidth)
{
+ if (fXRatio == 0.0)
+ throw o3tl::divide_by_zero();
fClipWidth = (fSclGrafWidth-fDisFrameWidth ) / 2 / fXRatio;
sal_bCropped = true;
}
@@ -564,6 +566,8 @@ void LwpGraphicObject::CreateGrafObject()
// need vertical crop?
if (fSclGrafHeight > fDisFrameHeight)
{
+ if (fYRatio == 0.0)
+ throw o3tl::divide_by_zero();
fClipHeight = (fSclGrafHeight-fDisFrameHeight ) / 2 / fYRatio;
sal_bCropped = true;
}
More information about the Libreoffice-commits
mailing list