mirror of
https://github.com/php/php-src.git
synced 2024-09-24 03:17:26 +00:00
- Fixed invalid free in call_user_method() function
This commit is contained in:
parent
735dc01811
commit
4fffb5f5e0
1
NEWS
1
NEWS
@ -10,6 +10,7 @@ PHP NEWS
|
||||
(klightspeed at netspace dot net dot au)
|
||||
. Fixed bug #52624 (tempnam() by-pass open_basedir with nonnexistent
|
||||
directory). (Felipe)
|
||||
. Fixed invalid free in call_user_method() function. (Felipe)
|
||||
|
||||
- Zend Engine:
|
||||
. Fixed bug #43200 (Interface implementation / inheritence not possible in
|
||||
|
@ -4825,7 +4825,9 @@ PHP_FUNCTION(call_user_method)
|
||||
Z_TYPE_P(object) != IS_STRING
|
||||
) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second argument is not an object or class name");
|
||||
efree(params);
|
||||
if (params) {
|
||||
efree(params);
|
||||
}
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
call_user_method() Invalid free
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
call_user_method("1", $arr1);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Deprecated: Function call_user_method() is deprecated in %s on line %d
|
||||
|
||||
Warning: call_user_method(): Second argument is not an object or class name in %s on line %d
|
Loading…
Reference in New Issue
Block a user