mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Fixed bug #78658
This commit is contained in:
parent
cbf589b17c
commit
6fd6ad8f53
3 changed files with 18 additions and 1 deletions
3
NEWS
3
NEWS
|
@ -2,6 +2,9 @@ PHP NEWS
|
||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||
?? ??? ????, PHP 7.3.12
|
?? ??? ????, PHP 7.3.12
|
||||||
|
|
||||||
|
- Core:
|
||||||
|
. Fixed bug #78658 (Memory corruption using Closure::bindTo). (Nikita)
|
||||||
|
|
||||||
- Iconv:
|
- Iconv:
|
||||||
. Fixed bug #78642 (Wrong libiconv version displayed). (gedas at martynas,
|
. Fixed bug #78642 (Wrong libiconv version displayed). (gedas at martynas,
|
||||||
cmb).
|
cmb).
|
||||||
|
|
14
Zend/tests/bug78658.phpt
Normal file
14
Zend/tests/bug78658.phpt
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #78658: Memory corruption using Closure::bindTo()
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$c = function(){};
|
||||||
|
|
||||||
|
$scope = "AAAA";
|
||||||
|
$scope = "{$scope}BBBB";
|
||||||
|
$c->bindTo(new stdClass, $scope);
|
||||||
|
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
Warning: Class 'AAAABBBB' not found in %s on line %d
|
|
@ -200,7 +200,7 @@ ZEND_METHOD(Closure, bind)
|
||||||
ce = closure->func.common.scope;
|
ce = closure->func.common.scope;
|
||||||
} else if ((ce = zend_lookup_class_ex(class_name, NULL, 1)) == NULL) {
|
} else if ((ce = zend_lookup_class_ex(class_name, NULL, 1)) == NULL) {
|
||||||
zend_error(E_WARNING, "Class '%s' not found", ZSTR_VAL(class_name));
|
zend_error(E_WARNING, "Class '%s' not found", ZSTR_VAL(class_name));
|
||||||
zend_string_release_ex(class_name, 0);
|
zend_tmp_string_release(tmp_class_name);
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
zend_tmp_string_release(tmp_class_name);
|
zend_tmp_string_release(tmp_class_name);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue