diff options
| author | Stanislav Malyshev <stas@php.net> | 2015-05-12 14:24:15 -0700 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2015-05-12 14:24:15 -0700 |
| commit | c08f9c2c786b0f7cbb401c18f6634cb5773f5baf (patch) | |
| tree | 5092cb2f0c1fa69076b0bcc8f2bc8a46308514c4 /ext/standard/basic_functions.c | |
| parent | c117548ea9365adac00960fe5f43425b2955310d (diff) | |
| parent | f473ea5464361848f6fc45a8456c78de6d9f53c6 (diff) | |
| download | php-git-c08f9c2c786b0f7cbb401c18f6634cb5773f5baf.tar.gz | |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
fix format
update NEWS
Add test for bug #69522
Update tests
Fix bug #69522 - do not allow int overflow
Forgot test file
Fix bug #69403 and other int overflows
Fixed bug #69418 - more s->p fixes for filenames
Fixed bug #69364 - use smart_str to assemble strings
Fix bug #69453 - don't try to cut empty string
Fix bug #69545 - avoid overflow when reading list
Conflicts:
ext/pcntl/pcntl.c
ext/standard/basic_functions.c
ext/standard/pack.c
ext/standard/tests/dir/opendir_variation1-win32.phpt
Diffstat (limited to 'ext/standard/basic_functions.c')
| -rw-r--r-- | ext/standard/basic_functions.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index a3783e0712..98a5bb6db6 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2127,7 +2127,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_stream_set_write_buffer, 0) ZEND_ARG_INFO(0, fp) ZEND_ARG_INFO(0, buffer) ZEND_END_ARG_INFO() - + ZEND_BEGIN_ARG_INFO(arginfo_stream_set_chunk_size, 0) ZEND_ARG_INFO(0, fp) ZEND_ARG_INFO(0, chunk_size) @@ -2322,7 +2322,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_lcfirst, 0) ZEND_ARG_INFO(0, str) ZEND_END_ARG_INFO() - + ZEND_BEGIN_ARG_INFO_EX(arginfo_ucwords, 0, 0, 1) ZEND_ARG_INFO(0, str) ZEND_ARG_INFO(0, delimiters) @@ -3475,7 +3475,7 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) /* BG(user_tick_functions) = NULL; BG(user_filter_map) = NULL; BG(serialize_lock) = 0; - + memset(&BG(serialize), 0, sizeof(BG(serialize))); memset(&BG(unserialize), 0, sizeof(BG(unserialize))); @@ -4034,8 +4034,8 @@ PHP_FUNCTION(getenv) int size; SetLastError(0); - /*If the given bugger is not large enough to hold the data, the return value is - the buffer size, in characters, required to hold the string and its terminating + /*If the given bugger is not large enough to hold the data, the return value is + the buffer size, in characters, required to hold the string and its terminating null character. We use this return value to alloc the final buffer. */ size = GetEnvironmentVariableA(str, &dummybuf, 0); if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) { @@ -4087,7 +4087,7 @@ PHP_FUNCTION(putenv) if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &setting, &setting_len) == FAILURE) { return; } - + if(setting_len == 0 || setting[0] == '=') { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter syntax"); RETURN_FALSE; @@ -4634,7 +4634,7 @@ PHP_FUNCTION(set_magic_quotes_runtime) if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &new_setting) == FAILURE) { return; } - + if (new_setting) { php_error_docref(NULL TSRMLS_CC, E_CORE_ERROR, "magic_quotes_runtime is not supported anymore"); } @@ -4922,7 +4922,7 @@ PHP_FUNCTION(forward_static_call) instanceof_function(EG(called_scope), fci_cache.calling_scope TSRMLS_CC)) { fci_cache.called_scope = EG(called_scope); } - + if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) { COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr); } @@ -5495,7 +5495,7 @@ PHP_FUNCTION(set_include_path) int new_value_len; char *old_value; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &new_value, &new_value_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &new_value, &new_value_len) == FAILURE) { return; } @@ -5623,7 +5623,7 @@ PHP_FUNCTION(getservbyname) } -/* empty string behaves like NULL on windows implementation of +/* empty string behaves like NULL on windows implementation of getservbyname. Let be portable instead. */ #ifdef PHP_WIN32 if (proto_len == 0) { @@ -6051,7 +6051,7 @@ PHP_FUNCTION(parse_ini_string) /* }}} */ #if ZEND_DEBUG -/* This function returns an array of ALL valid ini options with values and +/* This function returns an array of ALL valid ini options with values and * is not the same as ini_get_all() which returns only registered ini options. Only useful for devs to debug php.ini scanner/parser! */ PHP_FUNCTION(config_get_hash) /* {{{ */ { |
