06 Aug 2015, PHP 7.0.0 Beta 3
- Core:
- . Fixed bug #36365 (scandir duplicates file name at every 65535th file). (cmb)
+ . Fixed bug #70156 (Segfault in zend_find_alias_name). (Laruence)
. Fixed bug #70124 (null ptr deref / seg fault in ZEND_HANDLE_EXCEPTION).
(Laruence)
. Fixed bug #70117 (Unexpected return type error). (Laruence)
- Standard:
. Fixed bug #70140 (str_ireplace/php_string_tolower - Arbitrary Code
Execution). (Laruence)
+ . Fixed bug #36365 (scandir duplicates file name at every 65535th file). (cmb)
23 Jul 2015, PHP 7.0.0 Beta 2
--- /dev/null
+--TEST--
+Bug #70156 (Segfault in zend_find_alias_name)
+--FILE--
+<?php
+trait T1 {
+ protected function foo1()
+ {
+ $this->bar();
+ }
+}
+
+trait T2 {
+ protected function foo2()
+ {
+ debug_print_backtrace();
+ }
+}
+
+class dummy {
+ use T1 {
+ foo1 as private;
+ }
+ use T2 {
+ foo2 as bar;
+ }
+ public function __construct()
+ {
+ $this->foo1();
+ }
+}
+
+new dummy();
+?>
+--EXPECTF--
+#0 dummy->bar() called at [%sbug70156.php:%d]
+#1 dummy->foo1() called at [%sbug70156.php:%d]
+#2 dummy->__construct() called at [%sbug70156.php:%d]
if ((alias_ptr = ce->trait_aliases)) {
alias = *alias_ptr;
while (alias) {
- if (ZSTR_LEN(alias->alias) == ZSTR_LEN(name) &&
- !strncasecmp(ZSTR_VAL(name), ZSTR_VAL(alias->alias), ZSTR_LEN(alias->alias))) {
+ if (alias->alias && zend_string_equals_ci(alias->alias, name)) {
return alias->alias;
}
alias_ptr++;