cvs: php-src /ext/mbstring mbstring.c

From: Date: Thu, 02 Mar 2006 00:34:28 +0000
Subject: cvs: php-src /ext/mbstring mbstring.c
Groups: php.cvs 
Request: Send a blank email to [email protected] to get a copy of this message
yohgaki		Thu Mar  2 00:34:28 2006 UTC

  Modified files:              
    /php-src/ext/mbstring	mbstring.c 
  Log:
  add safe_mode num of parameter check
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.c?r1=1.238&r2=1.239&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.238 php-src/ext/mbstring/mbstring.c:1.239
--- php-src/ext/mbstring/mbstring.c:1.238	Thu Feb 23 20:15:36 2006
+++ php-src/ext/mbstring/mbstring.c	Thu Mar  2 00:34:28 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mbstring.c,v 1.238 2006/02/23 20:15:36 helly Exp $ */
+/* $Id: mbstring.c,v 1.239 2006/03/02 00:34:28 yohgaki Exp $ */
 
 /*
  * PHP 4 Multibyte String module "mbstring"
@@ -3069,7 +3069,12 @@
 	HashTable ht_headers;
 	smart_str *s;
 	extern void mbfl_memory_device_unput(mbfl_memory_device *device);
-	
+
+	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);


Thread (1 message)

  • Yasuo Ohgaki
« previous php.cvs (#37072) next »