cvs: gd(GD_2_0) /libgd gd.c

[email protected] ("Pierre-Alain Joye")
Newsgroups php.gd.cvs
Message-ID <cvspajoye1170464406@cvsserver>
pajoye		Sat Feb  3 01:00:06 2007 UTC

  Modified files:              (Branch: GD_2_0)
    /gd/libgd	gd.c 
  Log:
  - #14, sanity check
  
  
http://cvs.php.net/viewvc.cgi/gd/libgd/gd.c?r1=1.49&r2=1.49.2.1&diff_format=u
Index: gd/libgd/gd.c
diff -u gd/libgd/gd.c:1.49 gd/libgd/gd.c:1.49.2.1
--- gd/libgd/gd.c:1.49	Mon Jan 29 21:56:37 2007
+++ gd/libgd/gd.c	Sat Feb  3 01:00:05 2007
@@ -1,4 +1,4 @@
-/* $Id: gd.c,v 1.49 2007/01/29 21:56:37 pajoye Exp $ */
+/* $Id: gd.c,v 1.49.2.1 2007/02/03 01:00:05 pajoye Exp $ */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -1941,6 +1941,9 @@
 
 	nc =  gdImageTileGet(im,x,y);
 	pts = (int **) gdCalloc(sizeof(int *) * im->sy, sizeof(int));
+	if (!pts) {
+		return;
+	}
 
 	for (i=0; i<im->sy;i++) {
 		pts[i] = (int *) gdCalloc(im->sx, sizeof(int));
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.