diff options
author | Dmitry Stogov <dmitry@php.net> | 2008-03-04 10:06:52 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2008-03-04 10:06:52 +0000 |
commit | 8365e71cb92b5242277109d64a1a0f60d8313340 (patch) | |
tree | 7eddffc16d417b572ff367c618e06649dbbb2751 /Zend/zend_execute.c | |
parent | 1a3f7f64509725a2ecac2a266e79391ac9d731cf (diff) | |
download | php-git-8365e71cb92b5242277109d64a1a0f60d8313340.tar.gz |
Fixed wrong result of cascading assignment to string offset
Fixed memory corruption on cascading assignment of IS_TMP_VAR into string offset
Fixed opcode caches shared memory corruption on cascading assignment of IS_CONST
into string offset
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r-- | Zend/zend_execute.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index e6b52cbef1..721d410d16 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -626,13 +626,13 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval FREE_OP_IF_VAR(free_value); } -static inline void zend_assign_to_string_offset(temp_variable *T, zval *value, int value_type TSRMLS_DC) +static inline int zend_assign_to_string_offset(temp_variable *T, zval *value, int value_type TSRMLS_DC) { if (Z_TYPE_P(T->str_offset.str) == IS_STRING) { if (((int)T->str_offset.offset < 0)) { zend_error(E_WARNING, "Illegal string offset: %d", T->str_offset.offset); - return; + return 0; } if (T->str_offset.offset >= Z_STRLEN_P(T->str_offset.str)) { @@ -667,6 +667,7 @@ static inline void zend_assign_to_string_offset(temp_variable *T, zval *value, i T(result->u.var).var = &T->str_offset.str; */ } + return 1; } static inline zval* zend_assign_to_variable(zval **variable_ptr_ptr, zval *value, int is_tmp_var TSRMLS_DC) |