com php-src: Fixed invalid read (Part issue of #69579): Zend/zend_inheritance.c

From: Date: Fri, 10 Jul 2015 14:26:53 +0000
Subject: com php-src: Fixed invalid read (Part issue of #69579): Zend/zend_inheritance.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87913@lists.php.net to get a copy of this message
Commit: 8e709d7f5d30d35397a31eb4ba3e836772c6eb0d Author: Xinchen Hui <laruence@php.net> Fri, 10 Jul 2015 22:26:53 +0800 Parents: 25d327e53fc1ac3e36483124fbf168a86ab0cfb9 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8e709d7f5d30d35397a31eb4ba3e836772c6eb0d Log: Fixed invalid read (Part issue of #69579) Bugs: https://bugs.php.net/69579 Changed paths: M Zend/zend_inheritance.c Diff: diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 4bd7eb9..c794c96 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) {

« previous php.cvs (#87913) next »