1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

dom: Fix missing NUL byte check on C14NFile()

Closes GH-20466.
This commit is contained in:
Niels Dossche
2025-11-12 22:07:11 +01:00
parent b620d9d228
commit 8ad5915756
2 changed files with 4 additions and 1 deletions

3
NEWS
View File

@@ -11,6 +11,9 @@ PHP NEWS
. Fix crashes when trying to instantiate uninstantiable classes via date
static constructors. (ndossche)
- DOM:
. Fix missing NUL byte check on C14NFile(). (ndossche)
- Opcache:
. Fixed bug GH-20329 (opcache.file_cache broken with full interned string
buffer). (Arnaud)

View File

@@ -1857,7 +1857,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{
}
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(),
"s|bba!a!", &file, &file_len, &exclusive,
"p|bba!a!", &file, &file_len, &exclusive,
&with_comments, &xpath_array, &ns_prefixes) == FAILURE) {
RETURN_THROWS();
}