- Undeprecated ticks. (Arnaud)
- Upgraded bundled sqlite to version 3.6.12. (Scott)
+- Fixed bug #47880 (crashes in call_user_func_array()). (Dmitry)
- Fixed bug #47856 (stristr() converts needle to lower-case). (Ilia)
- Fixed bug #47851 (is_callable throws fatal error). (Dmitry)
- Fixed bug #47819 (Getting pdo_mysql.so: undefined symbol: mysqlnd_debug_init
--- /dev/null
+--TEST--
+Bug #47880 (crashes in call_user_func_array())
+--FILE--
+<?php
+class bomb {
+ static function go($n) {
+ $backtrace = debug_backtrace(false);
+ $backtrace[1]['args'][1] = 'bomb';
+ }
+}
+call_user_func_array(array('bomb', 'go'), array(0));
+echo "ok\n";
+?>
+--EXPECT--
+ok
ZEND_API void zend_fcall_info_args_clear(zend_fcall_info *fci, int free_mem) /* {{{ */
{
if (fci->params) {
- while (fci->param_count) {
- zval_ptr_dtor(fci->params[--fci->param_count]);
- }
if (free_mem) {
efree(fci->params);
fci->params = NULL;
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(args), &pos);
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(args), (void *) &arg, &pos) == SUCCESS) {
*params++ = arg;
- Z_ADDREF_P(*arg);
zend_hash_move_forward_ex(Z_ARRVAL_P(args), &pos);
}
fci->params = (zval ***) erealloc(fci->params, fci->param_count * sizeof(zval **));
for (i = 0; i < argc; ++i) {
- Z_ADDREF_P(*(argv[i]));
fci->params[i] = argv[i];
}
}
for (i = 0; i < argc; ++i) {
arg = va_arg(*argv, zval **);
- Z_ADDREF_P(*arg);
fci->params[i] = arg;
}
}