]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.3' into PHP-7.4
authorChristoph M. Becker <cmbecker69@gmx.de>
Thu, 13 Feb 2020 14:15:45 +0000 (15:15 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Thu, 13 Feb 2020 14:16:09 +0000 (15:16 +0100)
* PHP-7.3:
  Fix #77569: Write Acess Violation in DomImplementation

1  2 
NEWS
ext/dom/document.c

diff --cc NEWS
index d8467ac0186b866bb9b4880328570422f437bb7e,0777b34d5592a1b594d00b5090d4ba0b16078213..9c2d4a8e5e785fd1f0170c7ef94b1a6401c5661a
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -11,12 -7,12 +11,16 @@@ PH
      (cmb)
    . Fixed bug #79242 (COM error constants don't match com_exception codes on
      x86). (cmb)
 +  . Fixed bug #79247 (Garbage collecting variant objects segfaults). (cmb)
    . Fixed bug #79248 (Traversing empty VT_ARRAY throws com_exception). (cmb)
  
 +- CURL:
 +  . Fixed bug #79019 (Copied cURL handles upload empty file). (cmb)
 +
+ - DOM:
+   . Fixed bug #77569: (Write Acess Violation in DomImplementation). (Nikita,
+     cmb)
  - PCRE:
    . Fixed bug #79188 (Memory corruption in preg_replace/preg_replace_callback
      and unicode). (Nikita)
index df1e7a8dfbeda754e17f09c227ca05163b3d709f,22bb90d5d88db3620a553d17e688739253ebb371..b10bed72ddb70c619928b1f6a36ea89db8d0867a
@@@ -337,12 -337,9 +337,12 @@@ int dom_document_encoding_write(dom_obj
                return FAILURE;
        }
  
 -      str = zval_get_string(newval);
 +      str = zval_try_get_string(newval);
 +      if (UNEXPECTED(!str)) {
 +              return FAILURE;
 +      }
  
-       handler = xmlFindCharEncodingHandler(Z_STRVAL_P(newval));
+       handler = xmlFindCharEncodingHandler(ZSTR_VAL(str));
  
      if (handler != NULL) {
                xmlCharEncCloseFunc(handler);