From e2218515d240816dcdd68dc4ac82d103d76f14a1 Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Thu, 2 Mar 2006 00:37:22 +0000 Subject: [PATCH] MFH add safe_mode num of parameter check --- ext/mbstring/mbstring.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index ca440766c8..5549ad6bf9 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -3068,7 +3068,12 @@ PHP_FUNCTION(mb_send_mail) 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); -- 2.50.1