From: Christoph M. Becker Date: Mon, 11 May 2020 14:25:30 +0000 (+0200) Subject: Merge branch 'PHP-7.4' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43eca196e7d33a45d64da0fd3a97c874d504288e;p=php Merge branch 'PHP-7.4' * PHP-7.4: Fix #79571: FFI: var_dumping unions may segfault --- 43eca196e7d33a45d64da0fd3a97c874d504288e diff --cc ext/ffi/ffi.c index 7784c7b389,fa81868230..2d33694764 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@@ -2345,8 -2372,11 +2348,8 @@@ static zval *zend_ffi_read_var(zend_obj return &EG(uninitialized_zval); } - zend_tmp_string_release(tmp_var_name); - if (sym->kind == ZEND_FFI_SYM_VAR) { - zend_ffi_cdata_to_zval(NULL, sym->addr, ZEND_FFI_TYPE(sym->type), read_type, rv, (zend_ffi_flags)sym->is_const, 0); + zend_ffi_cdata_to_zval(NULL, sym->addr, ZEND_FFI_TYPE(sym->type), read_type, rv, (zend_ffi_flags)sym->is_const, 0, 0); } else if (sym->kind == ZEND_FFI_SYM_FUNC) { zend_ffi_cdata *cdata; zend_ffi_type *new_type = emalloc(sizeof(zend_ffi_type));