pajoye Mon May 8 14:04:40 2006 UTC Added files: (Branch: PHP_4_4) /php-src/ext/gd/tests bug37346.phpt bug37346.gif bug37360.gif bug37360.phpt
Modified files: /php-src/ext/gd/libgd gd_gif_in.c /php-src NEWS Log: - MFH: #37346, invalid colormap format - MFH: #37360, bad gif size http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/libgd/gd_gif_in.c?r1=1.2.2.2.6.1&r2=1.2.2.2.6.2&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.2.2.2.6.1 php-src/ext/gd/libgd/gd_gif_in.c:1.2.2.2.6.2 --- php-src/ext/gd/libgd/gd_gif_in.c:1.2.2.2.6.1 Sun Sep 25 12:13:49 2005 +++ php-src/ext/gd/libgd/gd_gif_in.c Mon May 8 14:04:39 2006 @@ -147,7 +147,10 @@ Background = buf[5]; AspectRatio = buf[6]; - if (BitSet(buf[4], LOCALCOLORMAP)) { /* Global Colormap */ + imw = LM_to_uint(buf[0],buf[1]); + imh = LM_to_uint(buf[2],buf[3]); + + if (BitSet(buf[4], LOCALCOLORMAP)) { /* Global Colormap */ if (ReadColorMap(fd, BitPixel, ColorMap)) { return 0; } @@ -182,16 +185,17 @@ bitPixel = 1<<((buf[8]&0x07)+1); - imw = LM_to_uint(buf[4],buf[5]); - imh = LM_to_uint(buf[6],buf[7]); + if (!useGlobalColormap) { + if (ReadColorMap(fd, bitPixel, localColorMap)) { + return 0; + } + } + if (!(im = gdImageCreate(imw, imh))) { return 0; } im->interlace = BitSet(buf[8], INTERLACE); if (! useGlobalColormap) { - if (ReadColorMap(fd, bitPixel, localColorMap)) { - return 0; - } ReadImage(im, fd, imw, imh, localColorMap, BitSet(buf[8], INTERLACE)); /*1.4//imageCount != imageNumber); */ http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.1247.2.920.2.127&r2=1.1247.2.920.2.128&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.920.2.127 php-src/NEWS:1.1247.2.920.2.128 --- php-src/NEWS:1.1247.2.920.2.127 Sun May 7 16:33:41 2006 +++ php-src/NEWS Mon May 8 14:04:39 2006 @@ -4,7 +4,9 @@ - Updated PCRE to version 6.6. (Andrei) - Added overflow checks to wordwrap() function. (Ilia) - Added a check for special characters in the session name. (Ilia) +- Fixed bug #34360 (bad gif size) (Pierre) - Fixed bug #37348 (make PEAR install ignore open_basedir). (Ilia) +- Fixed bug #37346 (invalid colormap format) (Pierre) - Fixed bug #37162 (wddx does not build as a shared extension). (jdolecek at NetBSD dot org, Ilia) - Fixed bug #37046 (foreach breaks static scope). (Dmitry) http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/tests/bug37346.phpt?view=markup&rev=1.1 Index: php-src/ext/gd/tests/bug37346.phpt +++ php-src/ext/gd/tests/bug37346.phpt http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/tests/bug37360.phpt?view=markup&rev=1.1 Index: php-src/ext/gd/tests/bug37360.phpt +++ php-src/ext/gd/tests/bug37360.phpt --TEST-- Bug #37360 (gdimagecreatefromgif, bad image sizes) --SKIPIF-- <?php if (!extension_loaded('gd')) die("skip gd extension not available\n"); if (!GD_BUNDLED) die('skip external GD libraries always fail'); ?> --FILE-- <?php $im = imagecreatefromgif(dirname(__FILE__) . '/bug37360.gif'); var_dump($im); ?> --EXPECTF-- resource(%d) of type (gd) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php