Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 31f1aecf8c108c4c387a5ba938e7bbf5 > files > 6

libwmf-0.2.8.4-28.mga3.src.rpm

--- libwmf-0.2.8.4/src/extra/gd/gd.c
+++ libwmf-0.2.8.4/src/extra/gd/gd.c
@@ -2483,6 +2483,10 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromXbm (FILE * fd)
     }
   bytes = (w * h / 8) + 1;
   im = gdImageCreate (w, h);
+  if (!im) {
+    return 0;
+  }
+
   gdImageColorAllocate (im, 255, 255, 255);
   gdImageColorAllocate (im, 0, 0, 0);
   x = 0;