cvs: php-src(PHP_4_4) /ext/mbstring mbstring.c
| From: | Yasuo Ohgaki | Date: | Thu, 02 Mar 2006 00:39:57 +0000 |
| Subject: | cvs: php-src(PHP_4_4) /ext/mbstring mbstring.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-37074@lists.php.net to get a copy of this message | ||
yohgaki Thu Mar 2 00:39:57 2006 UTC
Modified files: (Branch: PHP_4_4)
/php-src/ext/mbstring mbstring.c
Log:
MFH add safe_mode num of parameter check
http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.c?r1=1.142.2.47.2.9&r2=1.142.2.47.2.10&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.142.2.47.2.9
php-src/ext/mbstring/mbstring.c:1.142.2.47.2.10
--- php-src/ext/mbstring/mbstring.c:1.142.2.47.2.9 Mon Feb 6 10:42:58 2006
+++ php-src/ext/mbstring/mbstring.c Thu Mar 2 00:39:57 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.c,v 1.142.2.47.2.9 2006/02/06 10:42:58 tony2001 Exp $ */
+/* $Id: mbstring.c,v 1.142.2.47.2.10 2006/03/02 00:39:57 yohgaki Exp $ */
/*
* PHP4 Multibyte String module "mbstring"
@@ -3513,6 +3513,11 @@
char *to_r = NULL;
int to_len, i;
+ if (PG(safe_mode) && (ZEND_NUM_ARGS() == 5)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "SAFE MODE Restriction in effect. The fifth
parameter is disabled in SAFE MODE.");
+ RETURN_FALSE;
+ }
+
/* initialize */
mbfl_memory_device_init(&device, 0, 0);
mbfl_string_init(&orig_str);