From 78ca92f77be561f0f07c7c2d6402139e2106f41c Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Mon, 19 Jan 2009 16:35:58 +0000 Subject: [PATCH] MFH: bump up and use IMAGE_FILTER_MAX_ARGS instead of a magic number. --- ext/gd/gd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 5cb2129798..c14afc8b08 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -143,7 +143,7 @@ int gdImageColorClosestHWB(gdImagePtr im, int r, int g, int b); #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); @@ -4966,7 +4966,7 @@ PHP_FUNCTION(imagefilter) 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; -- 2.40.0