Skip to content

Commit

Permalink
laruence#357 autoload bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
owenliang committed Jun 29, 2017
1 parent 81fcb83 commit e7f940d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yaf_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ PHP_METHOD(yaf_loader, autoload) {
/* }}} */

file_name_len = class_name_len;
file_name = class_name;
file_name = estrndup(class_name, class_name_len);

} while(0);

Expand Down

1 comment on commit e7f940d

@owenliang
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

虽然鸟哥代码之前的代码有意的在yaf_loader_is_local_namespace里复原了修改过的class_name。

但是不知道对zend取来的参数有何影响,毕竟是一个backtrace里的,zend也不应该复用这个内存的样子。

但是,这么改后的确就不会再抛异常了。

Please sign in to comment.