Skip to content

Commit 9e4fbb5

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix UAF in tidy when tidySetErrorBuffer() fails
2 parents aebe5c9 + 58df9fc commit 9e4fbb5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ PHP NEWS
8282
- Tidy:
8383
. Fixed GH-19021 (improved tidyOptGetCategory detection).
8484
(arjendekorte, David Carlier, Peter Kokot)
85+
. Fix UAF in tidy when tidySetErrorBuffer() fails. (nielsdos)
8586

8687
- XMLReader:
8788
. Fix arginfo/zpp violations when LIBXML_SCHEMAS_ENABLED is not available.

ext/tidy/tidy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ static zend_object *tidy_object_new(zend_class_entry *class_type, zend_object_ha
447447
efree(intern->ptdoc->errbuf);
448448
tidyRelease(intern->ptdoc->doc);
449449
efree(intern->ptdoc);
450-
efree(intern);
450+
/* TODO: convert to exception */
451451
php_error_docref(NULL, E_ERROR, "Could not set Tidy error buffer");
452452
}
453453

0 commit comments

Comments
 (0)