mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Cleanup (make sterling happy).
This commit is contained in:
parent
7e4beef623
commit
fdd2cb6024
1 changed files with 3 additions and 5 deletions
|
@ -2344,13 +2344,11 @@ PHP_FUNCTION(ini_set)
|
|||
}
|
||||
}
|
||||
|
||||
#define _CHECK_SAFEMODE_INI(ini, var) strncmp(ini, Z_STRVAL_PP(var), sizeof(ini))
|
||||
|
||||
/* checks that ensure the user does not overwrite certain ini settings when safe_mode is enabled */
|
||||
if (PG(safe_mode)) {
|
||||
if (!_CHECK_SAFEMODE_INI("max_execution_time", varname) ||
|
||||
!_CHECK_SAFEMODE_INI("memory_limit", varname) ||
|
||||
!_CHECK_SAFEMODE_INI("child_terminate", varname)) {
|
||||
if (!strncmp("max_execution_time", Z_STRVAL_PP(varname), sizeof("max_execution_time")) ||
|
||||
!strncmp("memory_limit", Z_STRVAL_PP(varname), sizeof("memory_limit")) ||
|
||||
!strncmp("child_terminate", Z_STRVAL_PP(varname), sizeof("child_terminate"))) {
|
||||
zval_dtor(return_value);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue