summaryrefslogtreecommitdiff
path: root/ext/mbstring/mb_gpc.c
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2012-11-13 10:10:41 +0000
committerDerick Rethans <github@derickrethans.nl>2012-11-13 10:10:41 +0000
commit1e081a825e7957286ce8df3cd7d48a9dd2a1787c (patch)
tree0947696b89521fbc4c2eecc140c7251902c4d46b /ext/mbstring/mb_gpc.c
parent1784279be07f1ea18baff67646d9d75896cae36f (diff)
parentbb60122c2fe49985b35026ecc48ff6cf550fbac1 (diff)
downloadphp-git-1e081a825e7957286ce8df3cd7d48a9dd2a1787c.tar.gz
Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3
Diffstat (limited to 'ext/mbstring/mb_gpc.c')
-rw-r--r--ext/mbstring/mb_gpc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/mbstring/mb_gpc.c b/ext/mbstring/mb_gpc.c
index dd60302d03..b35ece31de 100644
--- a/ext/mbstring/mb_gpc.c
+++ b/ext/mbstring/mb_gpc.c
@@ -262,6 +262,12 @@ enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_
n++;
var = php_strtok_r(NULL, info->separator, &strtok_buf);
}
+
+ if (n > (PG(max_input_vars) * 2)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini.", PG(max_input_vars));
+ goto out;
+ }
+
num = n; /* make sure to process initilized vars only */
/* initialize converter */