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

New commits:
commit fef3bbc1ef61fb8ee94dc12179d1f660e4016458
Author: Marek Kasik <[email protected]>
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;
       }
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to