[poppler] poppler/CairoOutputDev.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Sep 22 09:31:12 UTC 2019


 poppler/CairoOutputDev.cc |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit fef3bbc1ef61fb8ee94dc12179d1f660e4016458
Author: Marek Kasik <mkasik at redhat.com>
Date:   Fri Sep 20 16:33:04 2019 +0200

    CairoOutputDev: Check scaled dimensions for 0
    
    Check scaledWidth and scaledHeight for 0 at RescaleDrawImage::getSourceImage()
    as is done on other places. Set the dimension to 1 if it is 0.
    
    Fixes issue #737

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 68927636..12f312c6 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -3134,6 +3134,13 @@ public:
 	  scaledWidth = MAX_PRINT_IMAGE_SIZE * (double)width/height;
 	}
 	needsCustomDownscaling = true;
+
+        if (scaledWidth == 0) {
+          scaledWidth = 1;
+        }
+        if (scaledHeight == 0) {
+          scaledHeight = 1;
+        }
       } else {
 	needsCustomDownscaling = false;
       }


More information about the poppler mailing list