cvs: gd(GD_2_0) /libgd gd.c

From: Date: Sun, 17 Jun 2007 18:49:58 +0000
Subject: cvs: gd(GD_2_0) /libgd gd.c
Groups: php.gd.cvs 
Request: Send a blank email to php-gd-cvs+get-229@lists.php.net to get a copy of this message
nlopess Sun Jun 17 18:49:58 2007 UTC Modified files: (Branch: GD_2_0) /gd/libgd gd.c Log: backport a missing bit of bug #41 (_gdImageFillTiled() crashed if calloc failed) http://cvs.php.net/viewvc.cgi/gd/libgd/gd.c?r1=1.49.2.13&r2=1.49.2.14&diff_format=u Index: gd/libgd/gd.c diff -u gd/libgd/gd.c:1.49.2.13 gd/libgd/gd.c:1.49.2.14 --- gd/libgd/gd.c:1.49.2.13 Thu Jun 14 19:24:25 2007 +++ gd/libgd/gd.c Sun Jun 17 18:49:57 2007 @@ -1,4 +1,4 @@ -/* $Id: gd.c,v 1.49.2.13 2007/06/14 19:24:25 pajoye Exp $ */ +/* $Id: gd.c,v 1.49.2.14 2007/06/17 18:49:57 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -2028,6 +2028,10 @@ for (i=0; i<im->sy;i++) { pts[i] = (int *) gdCalloc(im->sx, sizeof(int)); + + if (!pts[i]) { + return; + } } stack = (struct seg *)gdMalloc(sizeof(struct seg) * ((int)(im->sy*im->sx)/4));

« previous php.gd.cvs (#229) next »