cvs: php-src /ext/gd/libgd gd.c

From: Date: Mon, 03 Sep 2007 14:34:42 +0000
Subject: cvs: php-src /ext/gd/libgd gd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-46041@lists.php.net to get a copy of this message
nlopess Mon Sep 3 14:34:42 2007 UTC Modified files: /php-src/ext/gd/libgd gd.c Log: MFB: malloc+memset == calloc # this was sitting here for quite a looong time.. http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.111&r2=1.112&diff_format=u Index: php-src/ext/gd/libgd/gd.c diff -u php-src/ext/gd/libgd/gd.c:1.111 php-src/ext/gd/libgd/gd.c:1.112 --- php-src/ext/gd/libgd/gd.c:1.111 Sun Aug 26 20:33:21 2007 +++ php-src/ext/gd/libgd/gd.c Mon Sep 3 14:34:42 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 (#46041) next »