cvs: gd(GD_2_0) /libgd gd_gd.c

[email protected] ("Mattias Bengtsson") Mon, 06 Aug 2007 18:35:02 -0000
Newsgroups php.gd.cvs
Message-ID <cvsmattias1186425302@cvsserver>
mattias		Mon Aug  6 18:35:02 2007 UTC

  Modified files:              (Branch: GD_2_0)
    /gd/libgd	gd_gd.c 
  Log:
  -MFH #101, _gdCreateFromFile() can crash if gdImageCreate fails
  
http://cvs.php.net/viewvc.cgi/gd/libgd/gd_gd.c?r1=1.11&r2=1.11.2.1&diff_format=u
Index: gd/libgd/gd_gd.c
diff -u gd/libgd/gd_gd.c:1.11 gd/libgd/gd_gd.c:1.11.2.1
--- gd/libgd/gd_gd.c:1.11	Wed Apr  5 15:52:22 2006
+++ gd/libgd/gd_gd.c	Mon Aug  6 18:35:02 2007
@@ -149,6 +149,10 @@
     {
       im = gdImageCreate (*sx, *sy);
     }
+  if (!im)
+  	{
+		goto fail1;
+	}
   if (!_gdGetColors (in, im, gd2xFlag))
     {
       goto fail2;