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

From: Date: Fri, 02 Mar 2007 18:41:25 +0000
Subject: cvs: php-src(PHP_5_2) /ext/gd/libgd gd_gif_in.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-43344@lists.php.net to get a copy of this message
nlopess Fri Mar 2 18:41:25 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/gd/libgd gd_gif_in.c Log: fix access to non initialized memory (check valgrind reports on http://gcov.php.net) http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_gif_in.c?r1=1.5.4.2.2.7&r2=1.5.4.2.2.8&diff_format=u Index: php-src/ext/gd/libgd/gd_gif_in.c diff -u php-src/ext/gd/libgd/gd_gif_in.c:1.5.4.2.2.7 php-src/ext/gd/libgd/gd_gif_in.c:1.5.4.2.2.8 --- php-src/ext/gd/libgd/gd_gif_in.c:1.5.4.2.2.7 Sat Feb 24 17:59:45 2007 +++ php-src/ext/gd/libgd/gd_gif_in.c Fri Mar 2 18:41:25 2007 @@ -121,7 +121,6 @@ int bitPixel; int i; /*1.4//int imageCount = 0; */ - char version[4]; gdImagePtr im = 0; ZeroDataBlock = FALSE; @@ -133,9 +132,8 @@ if (strncmp((char *)buf,"GIF",3) != 0) { return 0; } - strlcpy(version, (char *)buf + 3, sizeof(version)); - if ((strcmp(version, "87a") != 0) && (strcmp(version, "89a") != 0)) { + if ((strncmp((char*)buf+3, "87a", 3) != 0) && (strncmp((char*)buf+3, "89a", 3) != 0)) { return 0; } if (! ReadOK(fd,buf,7)) {

« previous php.cvs (#43344) next »