cvs: php-src(PHP_5_2) /ext/gd/libgd gd.c

From: Date: Sun, 17 Jun 2007 19:03:58 +0000
Subject: cvs: php-src(PHP_5_2) /ext/gd/libgd gd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-44857@lists.php.net to get a copy of this message
nlopess Sun Jun 17 19:03:58 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/gd/libgd gd.c Log: malloc+memset == calloc (sync with libgd) http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.90.2.1.2.16&r2=1.90.2.1.2.17&diff_format=u Index: php-src/ext/gd/libgd/gd.c diff -u php-src/ext/gd/libgd/gd.c:1.90.2.1.2.16 php-src/ext/gd/libgd/gd.c:1.90.2.1.2.17 --- php-src/ext/gd/libgd/gd.c:1.90.2.1.2.16 Sun Jun 17 16:51:50 2007 +++ php-src/ext/gd/libgd/gd.c Sun Jun 17 19:03:58 2007 @@ -129,8 +129,8 @@ return NULL; } - im = (gdImage *) gdMalloc(sizeof(gdImage)); - memset(im, 0, sizeof(gdImage)); + im = (gdImage *) gdCalloc(1, sizeof(gdImage)); + /* Row-major ever since gd 1.3 */ im->pixels = (unsigned char **) gdMalloc(sizeof(unsigned char *) * sy); im->AA_opacity = (unsigned char **) gdMalloc(sizeof(unsigned char *) * sy);

« previous php.cvs (#44857) next »