From: Christoph M. Becker Date: Thu, 14 Feb 2019 23:37:39 +0000 (+0100) Subject: Merge branch 'PHP-7.2' into PHP-7.3 X-Git-Tag: php-7.3.3RC1~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8946ad30009af055b5b2fed3044e61c78b7d77fb;p=php Merge branch 'PHP-7.2' into PHP-7.3 * PHP-7.2: Fix #77621: Already defined constants are not properly reported --- 8946ad30009af055b5b2fed3044e61c78b7d77fb diff --cc NEWS index b54d2fa1e4,2f6d4ef952..852eb976e3 --- a/NEWS +++ b/NEWS @@@ -5,23 -5,11 +5,27 @@@ PH - Core: . Fixed bug #77589 (Core dump using parse_ini_string with numeric sections). (Laruence) + . Fixed bug #77329 (Buffer Overflow via overly long Error Messages). + (Dmitry) + . Fixed bug #77494 (Disabling class causes segfault on member access). + (Dmitry) + . Fixed bug #77498 (Custom extension Segmentation fault when declare static + property). (Nikita) + . Fixed bug #77530 (PHP crashes when parsing `(2)::class`). (Ekin) + . Fixed bug #77546 (iptcembed broken function). (gdegoulet) + - COM: + . Fixed bug #77621 (Already defined constants are not properly reported). + (cmb) + +- Mbstring: + . Fixed bug #77514 (mb_ereg_replace() with trailing backslash adds null byte). + (Nikita) + +- OpenSSL: + . Fixed bug #77390 (feof might hang on TLS streams in case of fragmented TLS + records). (Abyl Valg, Jakub Zelenka) + - PDO_OCI: . Support Oracle Database tracing attributes ACTION, MODULE, CLIENT_INFO, and CLIENT_IDENTIFIER. (Cameron Porter) diff --cc ext/com_dotnet/com_typeinfo.c index 0ba344fd9e,40f21aea6b..6da55f7477 --- a/ext/com_dotnet/com_typeinfo.c +++ b/ext/com_dotnet/com_typeinfo.c @@@ -195,20 -197,21 +195,20 @@@ PHP_COM_DOTNET_API int php_com_import_t SysFreeString(bstr_ids); /* sanity check for the case where the constant is already defined */ + php_com_zval_from_variant(&value, pVarDesc->lpvarValue, codepage); if ((exists = zend_get_constant(c.name)) != NULL) { - if (COMG(autoreg_verbose) && !compare_function(&results, &c.value, exists)) { - php_error_docref(NULL, E_WARNING, "Type library constant %s is already defined", c.name); + if (COMG(autoreg_verbose) && !compare_function(&results, &value, exists)) { + php_error_docref(NULL, E_WARNING, "Type library constant %s is already defined", ZSTR_VAL(c.name)); } - zend_string_release(c.name); + zend_string_release_ex(c.name, 1); ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc); continue; } /* register the constant */ - php_com_zval_from_variant(&value, pVarDesc->lpvarValue, codepage); if (Z_TYPE(value) == IS_LONG) { - c.flags = mode; + ZEND_CONSTANT_SET_FLAGS(&c, mode, 0); ZVAL_LONG(&c.value, Z_LVAL(value)); - c.module_number = 0; zend_register_constant(&c); } ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc);