com php-src: added check by php_mb_check_forbidden_enco ding: ext/mbstring/mbstring.c
| From: | Joe Watkins | Date: | Thu, 19 Feb 2015 09:43:55 +0000 |
| Subject: | com php-src: added check by php_mb_check_forbidden_enco ding: ext/mbstring/mbstring.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96521@lists.php.net to get a copy of this message | ||
Commit: a8ef8a25e5ebf03bfb6092ab24fbbe1a0f56e162
Author: Masaki Kagaya <masakielastic@gmail.com> Thu, 19 Feb 2015 18:43:55 +0900
Parents: c6e94bfb4ca6f68b8b2b295a4d261181ff855504
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a8ef8a25e5ebf03bfb6092ab24fbbe1a0f56e162
Log:
added check by php_mb_check_forbidden_encoding
Changed paths:
M ext/mbstring/mbstring.c
Diff:
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 277ed47..78ffd5c 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -4780,7 +4780,7 @@ static inline char* php_mb_chr(long cp, const char* enc)
supported = true;
}
- if (!supported) {
+ if (!supported || php_mb_check_forbidden_encoding(no_enc)) {
php_error_docref(NULL, E_WARNING, "Unsupported encoding \"%s\"", enc);
return NULL;
}