[Libreoffice-commits] core.git: lotuswordpro/source

Caolán McNamara caolanm at redhat.com
Sat Jan 6 19:52:46 UTC 2018


 lotuswordpro/source/filter/lwpoleobject.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 946ae499df08cc632928c5431ba914a1ae6458dd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jan 6 15:25:41 2018 +0000

    ofz#4999 Divide-by-zero
    
    Change-Id: I80b4d8a4d2abdfb54fe60a880555ea1ff62af987
    Reviewed-on: https://gerrit.libreoffice.org/47503
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/lotuswordpro/source/filter/lwpoleobject.cxx b/lotuswordpro/source/filter/lwpoleobject.cxx
index 177508b89082..d9ca5f7ed088 100644
--- a/lotuswordpro/source/filter/lwpoleobject.cxx
+++ b/lotuswordpro/source/filter/lwpoleobject.cxx
@@ -162,6 +162,8 @@ void LwpGraphicOleObject::GetGrafScaledSize(double & fWidth, double & fHeight)
                     if (fWidth/fHeight >= fDisFrameWidth/fDisFrameHeight)
                     {
                         fSclGrafWidth = fDisFrameWidth;
+                        if (fWidth == 0.0)
+                            throw o3tl::divide_by_zero();
                         fSclGrafHeight = (fDisFrameWidth/fWidth) * fHeight;
                     }
                     else


More information about the Libreoffice-commits mailing list