iliaa Tue Feb 17 16:30:02 2004 EDT Modified files: /php-src/ext/gd gd.c Log: Fixed bug #27293 (two crashes inside image2wbmp()). http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.285&r2=1.286&ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.285 php-src/ext/gd/gd.c:1.286 --- php-src/ext/gd/gd.c:1.285 Tue Jan 27 20:36:53 2004 +++ php-src/ext/gd/gd.c Tue Feb 17 16:30:00 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.285 2004/01/28 01:36:53 iliaa Exp $ */ +/* $Id: gd.c,v 1.286 2004/02/17 21:30:00 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1724,6 +1724,8 @@ if (q < 0 || q > 255) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q); } + gdImageWBMP(im, q, fp); + break; case PHP_GDIMG_TYPE_JPG: (*func_p)(im, fp, q); break; @@ -1766,6 +1768,8 @@ if (q < 0 || q > 255) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q); } + gdImageWBMP(im, q, tmp); + break; case PHP_GDIMG_TYPE_JPG: (*func_p)(im, tmp, q); break; @@ -3741,6 +3745,10 @@ return; } + if (im_org->trueColor) { + gdImageTrueColorToPalette(im_org, 1, 256); + } + for (y = 0; y < dest_height; y++) { for (x = 0; x < dest_width; x++) { color_org = gdImageGetPixel(im_org, x, y);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php