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

Caolán McNamara caolanm at redhat.com
Fri Oct 27 10:02:38 UTC 2017


 filter/source/graphicfilter/icgm/cgm.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 1f0e40db86fe304338c7cdd772c8ef644b7a0e8b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 27 09:16:33 2017 +0100

    ofz#3834 Divide-by-zero
    
    Change-Id: I654152b964c6228efeb8b7cc7203064338fd1dd6
    Reviewed-on: https://gerrit.libreoffice.org/43934
    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/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index 22a016a17fc4..d535ff8878f4 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -404,6 +404,12 @@ void CGM::ImplSetMapMode()
     else
         mbAngReverse = false;
 
+    if (mnVDCdy == 0.0 || mnOutdy == 0.0)
+    {
+        mbStatus = false;
+        return;
+    }
+
     double fQuo1 = mnVDCdx / mnVDCdy;
     double fQuo2 = mnOutdx / mnOutdy;
     if ( fQuo2 < fQuo1 )


More information about the Libreoffice-commits mailing list