File xpdf-no-alloc-bitmap-data.patch of Package xpdf

--- splash/SplashFTFont.cc
+++ splash/SplashFTFont.cc
@@ -212,6 +212,10 @@
   } else {
     rowSize = (SafeInt(bitmap->w) + SafeInt(7)) >> 3;
   }
+  if (rowSize == 0 || bitmap->h == 0) {
+    bitmap->freeData = gFalse;
+    return gTrue;
+  }
   bitmap->data = (Guchar *)gmallocn(rowSize, bitmap->h);
   bitmap->freeData = gTrue;
   for (i = 0, p = bitmap->data, q = slot->bitmap.buffer;
openSUSE Build Service is sponsored by