File php-5.1.2-CVE-2007-3473.patch of Package php

--- ext/gd/libgd/xbm.c
+++ ext/gd/libgd/xbm.c
@@ -97,6 +97,9 @@
 	}
 
 	im = gdImageCreate(width, height);
+	if (!im) {
+		return 0;
+	}
 	gdImageColorAllocate(im, 255, 255, 255);
 	gdImageColorAllocate(im, 0, 0, 0);
 	h[2] = '\0';
openSUSE Build Service is sponsored by