summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@php.net>2009-01-19 16:35:58 +0000
committerTakeshi Abe <tabe@php.net>2009-01-19 16:35:58 +0000
commit78ca92f77be561f0f07c7c2d6402139e2106f41c (patch)
treee1fe0de2212797b745ff46eca83899e06a1c5d7c
parentf9de6e62a9b2db15ce1f044e9dc160ed646d26d1 (diff)
downloadphp-git-78ca92f77be561f0f07c7c2d6402139e2106f41c.tar.gz
MFH: bump up and use IMAGE_FILTER_MAX_ARGS instead of a magic number.
-rw-r--r--ext/gd/gd.c4
1 files 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;