[poppler] 2 commits - fofi/FoFiType1C.cc splash/Splash.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Sep 14 17:15:11 UTC 2017


 fofi/FoFiType1C.cc |    3 +++
 splash/Splash.cc   |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit da63c35549e8852a410946ab016a3f25ac701bdf
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu Sep 14 19:14:41 2017 +0200

    FoFiType1C::convertToType0: Fix crash in broken files
    
    Bug #102724

diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index 7a827855..7c9494f5 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes,
 	}
       }
 
+      if (fd >= nFDs)
+	continue;
+
       // font dictionary (unencrypted section)
       (*outputFunc)(outputStream, "16 dict begin\n", 14);
       (*outputFunc)(outputStream, "/FontName /", 11);
commit 504b3590182175390f474657a372e78fb1508262
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu Sep 14 19:14:23 2017 +0200

    Splash::scaleImage: Do not try to scale if srcHeight or srcWidth are < 1
    
    Bug #102719

diff --git a/splash/Splash.cc b/splash/Splash.cc
index 39fc7d64..aba7814f 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -4152,7 +4152,7 @@ SplashBitmap *Splash::scaleImage(SplashImageSource src, void *srcData,
   SplashBitmap *dest;
 
   dest = new SplashBitmap(scaledWidth, scaledHeight, 1, srcMode, srcAlpha, gTrue, bitmap->getSeparationList());
-  if (dest->getDataPtr() != NULL) {
+  if (dest->getDataPtr() != NULL && srcHeight > 0 && srcWidth > 0) {
     if (scaledHeight < srcHeight) {
       if (scaledWidth < srcWidth) {
 	scaleImageYdXd(src, srcData, srcMode, nComps, srcAlpha,


More information about the poppler mailing list