Commits

Anonymous committed a5550a7

- #94, gdImageCreateXbm can crash if gdImageCreate fails

  • Participants
  • Parent commits 96f5a6d

Comments (0)

Files changed (1)

     }
   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;