diff options
author | Xinchen Hui <laruence@php.net> | 2015-07-10 22:26:53 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-07-10 22:26:53 +0800 |
commit | 8e709d7f5d30d35397a31eb4ba3e836772c6eb0d (patch) | |
tree | 6fba0302a91ce695fedcf4eb6f2bebbbfddba9cb /Zend/zend_inheritance.c | |
parent | 25d327e53fc1ac3e36483124fbf168a86ab0cfb9 (diff) | |
download | php-git-8e709d7f5d30d35397a31eb4ba3e836772c6eb0d.tar.gz |
Fixed invalid read (Part issue of #69579)
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r-- | Zend/zend_inheritance.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 4bd7eb9c76..c794c969c0 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -1200,7 +1200,8 @@ static int zend_traits_copy_functions(zend_string *fnname, zend_function *fn, ze if (exclude_table == NULL || zend_hash_find(exclude_table, fnname) == NULL) { /* is not in hashtable, thus, function is not to be excluded */ - fn_copy = *fn; + /* And how about ZEND_OVERLOADED_FUNCTION? */ + memcpy(&fn_copy, fn, fn->type == ZEND_USER_FUNCTION? sizeof(zend_op_array) : sizeof(zend_internal_function)); /* apply aliases which have not alias name, just setting visibility */ if (ce->trait_aliases) { |