1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00

Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #77569: Write Acess Violation in DomImplementation
This commit is contained in:
Christoph M. Becker
2020-02-13 15:14:45 +01:00
3 changed files with 19 additions and 1 deletions
+4
View File
@@ -9,6 +9,10 @@ PHP NEWS
x86). (cmb)
. Fixed bug #79248 (Traversing empty VT_ARRAY throws com_exception). (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)
+1 -1
View File
@@ -339,7 +339,7 @@ int dom_document_encoding_write(dom_object *obj, zval *newval)
str = zval_get_string(newval);
handler = xmlFindCharEncodingHandler(Z_STRVAL_P(newval));
handler = xmlFindCharEncodingHandler(ZSTR_VAL(str));
if (handler != NULL) {
xmlCharEncCloseFunc(handler);
+14
View File
@@ -0,0 +1,14 @@
--TEST--
Bug #77569 (Write Acess Violation in DomImplementation)
--SKIPIF--
<?php
if (!extension_loaded('dom')) die('skip dom extension not available');
?>
--FILE--
<?php
$imp = new DOMImplementation;
$dom = $imp->createDocument("", "");
$dom->encoding = null;
?>
--EXPECTF--
Warning: main(): Invalid Document Encoding in %s on line %d