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

From: Date: Sat, 24 Sep 2005 14:40:15 +0000
Subject: cvs: php-src(PHP_5_0) /ext/gd/libgd gd_gif_in.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-34106@lists.php.net to get a copy of this message
pajoye Sat Sep 24 10:40:15 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/gd/libgd gd_gif_in.c Log: - MFH #33220, infinite loop while loading invalid GIF (nlopees) http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd_gif_in.c?r1=1.5&r2=1.5.2.1&ty=u Index: php-src/ext/gd/libgd/gd_gif_in.c diff -u php-src/ext/gd/libgd/gd_gif_in.c:1.5 php-src/ext/gd/libgd/gd_gif_in.c:1.5.2.1 --- php-src/ext/gd/libgd/gd_gif_in.c:1.5 Sun Dec 28 15:11:08 2003 +++ php-src/ext/gd/libgd/gd_gif_in.c Sat Sep 24 10:40:15 2005 @@ -259,13 +259,13 @@ if ((buf[0] & 0x1) != 0) *Transparent = buf[3]; - while (GetDataBlock(fd, (unsigned char*) buf) != 0) + while (GetDataBlock(fd, (unsigned char*) buf) > 0) ; return FALSE; default: break; } - while (GetDataBlock(fd, (unsigned char*) buf) != 0) + while (GetDataBlock(fd, (unsigned char*) buf) > 0) ; return FALSE; @@ -337,7 +337,7 @@ buf[0] = buf[last_byte-2]; buf[1] = buf[last_byte-1]; - if ((count = GetDataBlock(fd, &buf[2])) == 0) + if ((count = GetDataBlock(fd, &buf[2])) <= 0) done = TRUE; last_byte = 2 + count;

« previous php.cvs (#34106) next »