pajoye Mon May 8 11:49:33 2006 UTC Added files: /php-src/ext/gd/tests bug37360.gif bug37360.phpt
Modified files: /php-src/ext/gd/libgd gd_gif_in.c Log: - #37360, bad gif size http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/libgd/gd_gif_in.c?r1=1.9&r2=1.10&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.9 php-src/ext/gd/libgd/gd_gif_in.c:1.10 --- php-src/ext/gd/libgd/gd_gif_in.c:1.9 Mon May 8 11:46:13 2006 +++ php-src/ext/gd/libgd/gd_gif_in.c Mon May 8 11:49:33 2006 @@ -146,6 +146,9 @@ Background = buf[5]; AspectRatio = buf[6]; + 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; @@ -181,9 +184,6 @@ 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; 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