com php-src: Merge branch 'PHP-7.4': ext/reflection/php_refle ction.c
| From: | Nikita Popov | Date: | Wed, 13 Feb 2019 11:25:27 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.4': ext/reflection/php_refle ction.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-104616@lists.php.net to get a copy of this message | ||
Commit: c53852dc0a0e553a7d879eefe489c1c327d5bed2
Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 13 Feb 2019 12:25:27 +0100
Parents: 81eff22d2dadcc732d817433093bf9c8944655b4 6347f0b937cc3fb3edb38003a41f3f9e8608831d
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c53852dc0a0e553a7d879eefe489c1c327d5bed2
Log:
Merge branch 'PHP-7.4'
Changed paths:
MM ext/reflection/php_reflection.c
Diff:
diff --cc ext/reflection/php_reflection.c
index e025373,1e11b87..31c9449
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@@ -42,9 -44,22 +44,19 @@@
#include "zend_builtin_functions.h"
#include "zend_smart_str.h"
+ /* Key used to avoid leaking addresses in ReflectionProperty::getId() */
+ #define REFLECTION_KEY_LEN 16
+ ZEND_BEGIN_MODULE_GLOBALS(reflection)
+ zend_bool key_initialized;
+ unsigned char key[REFLECTION_KEY_LEN];
+ ZEND_END_MODULE_GLOBALS(reflection)
+ ZEND_DECLARE_MODULE_GLOBALS(reflection)
+
+ #define REFLECTION_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(reflection, v)
+
#define reflection_update_property(object, name, value) do { \
- zval member; \
- ZVAL_STR(&member, name); \
- zend_std_write_property(object, &member, value, NULL); \
+ zend_std_write_property(Z_OBJ_P(object), name, value, NULL); \
Z_TRY_DELREF_P(value); \
- zval_ptr_dtor(&member); \
} while (0)
#define reflection_update_property_name(object, value) \