Blob Blame History Raw
--- gd-2.0.33/gd_gd.c.overflow	2006-10-31 14:43:06.000000000 +0100
+++ gd-2.0.33/gd_gd.c	2006-10-31 14:44:16.000000000 +0100
@@ -149,6 +149,10 @@
     {
       im = gdImageCreate (*sx, *sy);
     }
+  if (!im)
+    {
+      goto fail1;
+    }
   if (!_gdGetColors (in, im, gd2xFlag))
     {
       goto fail2;
--- gd-2.0.33/gd.c.overflow	2006-10-31 14:18:02.000000000 +0100
+++ gd-2.0.33/gd.c	2006-10-31 14:27:54.000000000 +0100
@@ -2467,6 +2467,8 @@
     }
   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;