]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.2' into PHP-7.3
authorChristoph M. Becker <cmbecker69@gmx.de>
Thu, 14 Feb 2019 23:37:39 +0000 (00:37 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Thu, 14 Feb 2019 23:37:39 +0000 (00:37 +0100)
* PHP-7.2:
  Fix #77621: Already defined constants are not properly reported

1  2 
NEWS
ext/com_dotnet/com_typeinfo.c

diff --cc NEWS
index b54d2fa1e4c9a1e57e53025e04e7785766b9e628,2f6d4ef952139d574d7d4385e3652f98ff1abf45..852eb976e365261a2beabb29f6a81ce5cd62d918
--- 1/NEWS
--- 2/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)
index 0ba344fd9ecf2f86e53ab93a7ec0cbe2a6abb3a0,40f21aea6bda83bbbfab6ed7f7f3063fc8e53e38..6da55f7477aeca35c4821f53a1bc0ef9b8378f36
@@@ -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);