cvs: php-src(PHP_4_3) / NEWS /ext/gd config.m4 gd.c

From: Date: Tue, 27 Jul 2004 00:27:11 +0000
Subject: cvs: php-src(PHP_4_3) / NEWS /ext/gd config.m4 gd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-28015@lists.php.net to get a copy of this message
iliaa Mon Jul 26 20:27:11 2004 EDT Modified files: (Branch: PHP_4_3) /php-src NEWS /php-src/ext/gd config.m4 gd.c Log: MFH: Fixed bug #29349 (imagecreatefromstring() crashes with external GD library). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.708&r2=1.1247.2.709&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.708 php-src/NEWS:1.1247.2.709 --- php-src/NEWS:1.1247.2.708 Sun Jul 25 15:19:32 2004 +++ php-src/NEWS Mon Jul 26 20:27:10 2004 @@ -6,6 +6,8 @@ for doing performance stats without warnings in server-log. (Uwe Schindler) - Fixed bug #29369 (Uploaded files with ' or " in their names get their names truncated at those characters). (Ilia) +- Fixed bug #29349 (imagecreatefromstring() crashes with external GD library). + (Ilia, adconrad at debian dot org) - Fixed bug #29333 (output_buffering+trans_sess_id can corrupt output). (Ilia) - Fixed bug #29226 (ctype_* functions missing validation of numeric string representations). (Ilia) http://cvs.php.net/diff.php/php-src/ext/gd/config.m4?r1=1.120.2.20&r2=1.120.2.21&ty=u Index: php-src/ext/gd/config.m4 diff -u php-src/ext/gd/config.m4:1.120.2.20 php-src/ext/gd/config.m4:1.120.2.21 --- php-src/ext/gd/config.m4:1.120.2.20 Thu Jul 22 19:09:24 2004 +++ php-src/ext/gd/config.m4 Mon Jul 26 20:27:10 2004 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.120.2.20 2004/07/22 23:09:24 sesser Exp $ +dnl $Id: config.m4,v 1.120.2.21 2004/07/27 00:27:10 iliaa Exp $ dnl dnl @@ -258,6 +258,7 @@ PHP_CHECK_LIBRARY(gd, gdImageGifCtx, [AC_DEFINE(HAVE_GD_GIF_CTX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(gd, gdCacheCreate, [AC_DEFINE(HAVE_GD_CACHE_CREATE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(gd, gdFontCacheShutdown, [AC_DEFINE(HAVE_GD_THREAD_SAFE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ]) + PHP_CHECK_LIBRARY(gd, gdNewDynamicCtxEx, [AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ]) ]) dnl @@ -307,6 +308,7 @@ AC_DEFINE(HAVE_GD_GIF_READ, 1, [ ]) AC_DEFINE(HAVE_GD_GIF_CREATE, 1, [ ]) AC_DEFINE(HAVE_GD_IMAGEELLIPSE, 1, [ ]) + AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ]) dnl Make sure the libgd/ is first in the include path GDLIB_CFLAGS="-DHAVE_LIBPNG" http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.221.2.43&r2=1.221.2.44&ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.221.2.43 php-src/ext/gd/gd.c:1.221.2.44 --- php-src/ext/gd/gd.c:1.221.2.43 Thu Jul 22 22:28:51 2004 +++ php-src/ext/gd/gd.c Mon Jul 26 20:27:10 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.221.2.43 2004/07/23 02:28:51 edink Exp $ */ +/* $Id: gd.c,v 1.221.2.44 2004/07/27 00:27:10 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -107,6 +107,10 @@ int gdImageColorClosestHWB(gdImagePtr im, int r, int g, int b); #endif +#ifndef HAVE_GD_DYNAMIC_CTX_EX +#define gdNewDynamicCtxEx(len, data, val) gdNewDynamicCtx(len, data) +#endif + static gdImagePtr _php_image_create_from_string (zval **Data, char *tn, gdImagePtr (*ioctx_func_p)() TSRMLS_DC); static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, gdImagePtr (*func_p)(), gdImagePtr (*ioctx_func_p)()); static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, void (*func_p)()); @@ -1242,7 +1246,7 @@ #ifdef HAVE_GD_WBMP else { gdIOCtx *io_ctx; - io_ctx = gdNewDynamicCtx (8, data); + io_ctx = gdNewDynamicCtxEx (8, data, 0); if (io_ctx) { if (getmbi((int(*)(void*))gdGetC, io_ctx) == 0 && skipheader((int(*)(void*))gdGetC, io_ctx) == 0 ) { #if HAVE_LIBGD204 @@ -1274,7 +1278,7 @@ gdImagePtr im; gdIOCtx *io_ctx; - io_ctx = gdNewDynamicCtx (Z_STRLEN_PP(data), Z_STRVAL_PP(data)); + io_ctx = gdNewDynamicCtxEx(Z_STRLEN_PP(data), Z_STRVAL_PP(data), 0); if (!io_ctx) { return NULL; @@ -1428,7 +1432,7 @@ goto out_err; } - io_ctx = gdNewDynamicCtx(buff_size, buff); + io_ctx = gdNewDynamicCtxEx(buff_size, buff, 0); if(!io_ctx) { php_error_docref(NULL TSRMLS_CC, E_WARNING,"Cannot allocate GD IO context"); goto out_err;

« previous php.cvs (#28015) next »