mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-14124: Segmentation fault on unknown address 0x0001ffff8041 with XML extension under certain memory limit (#14126)
This commit is contained in:
4
NEWS
4
NEWS
@@ -13,6 +13,10 @@ PHP NEWS
|
||||
. Fix crash when calling childNodes next() when iterator is exhausted.
|
||||
(nielsdos)
|
||||
|
||||
- XML:
|
||||
. Fixed bug GH-14124 (Segmentation fault with XML extension under certain
|
||||
memory limit). (nielsdos)
|
||||
|
||||
09 May 2024, PHP 8.3.7
|
||||
|
||||
- Core:
|
||||
|
||||
@@ -1286,6 +1286,7 @@ PHP_FUNCTION(xml_parse_into_struct)
|
||||
parser->level = 0;
|
||||
xml_parser_free_ltags(parser);
|
||||
parser->ltags = safe_emalloc(XML_MAXLEVEL, sizeof(char *), 0);
|
||||
memset(parser->ltags, 0, XML_MAXLEVEL * sizeof(char *));
|
||||
|
||||
XML_SetElementHandler(parser->parser, _xml_startElementHandler, _xml_endElementHandler);
|
||||
XML_SetCharacterDataHandler(parser->parser, _xml_characterDataHandler);
|
||||
|
||||
Reference in New Issue
Block a user