cvs: php-src /ext/gd gd.c

From: Date: Mon, 19 Jan 2009 16:35:41 +0000
Subject: cvs: php-src /ext/gd gd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-55761@lists.php.net to get a copy of this message
tabe Mon Jan 19 16:35:41 2009 UTC Modified files: /php-src/ext/gd gd.c Log: bump up and use IMAGE_FILTER_MAX_ARGS instead of a magic number. http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.405&r2=1.406&diff_format=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.405 php-src/ext/gd/gd.c:1.406 --- php-src/ext/gd/gd.c:1.405 Thu Jan 15 07:55:18 2009 +++ php-src/ext/gd/gd.c Mon Jan 19 16:35:40 2009 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.405 2009/01/15 07:55:18 kalle Exp $ */ +/* $Id: gd.c,v 1.406 2009/01/19 16:35:40 tabe Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -114,7 +114,7 @@ #define IMAGE_FILTER_SMOOTH 10 #define IMAGE_FILTER_PIXELATE 11 #define IMAGE_FILTER_MAX 11 -#define IMAGE_FILTER_MAX_ARGS 5 +#define IMAGE_FILTER_MAX_ARGS 6 static void php_image_filter_negate(INTERNAL_FUNCTION_PARAMETERS); static void php_image_filter_grayscale(INTERNAL_FUNCTION_PARAMETERS); static void php_image_filter_brightness(INTERNAL_FUNCTION_PARAMETERS); @@ -4658,7 +4658,7 @@ php_image_filter_pixelate }; - if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 6) { + if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > IMAGE_FILTER_MAX_ARGS) { WRONG_PARAM_COUNT; } else if (zend_parse_parameters(2 TSRMLS_CC, "rl", &tmp, &filtertype) == FAILURE) { return;

« previous php.cvs (#55761) next »