Skip to content

Commit 8ad5915

Browse files
committed
dom: Fix missing NUL byte check on C14NFile()
Closes GH-20466.
1 parent b620d9d commit 8ad5915

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ PHP NEWS
1111
. Fix crashes when trying to instantiate uninstantiable classes via date
1212
static constructors. (ndossche)
1313

14+
- DOM:
15+
. Fix missing NUL byte check on C14NFile(). (ndossche)
16+
1417
- Opcache:
1518
. Fixed bug GH-20329 (opcache.file_cache broken with full interned string
1619
buffer). (Arnaud)

ext/dom/node.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{
18571857
}
18581858
} else {
18591859
if (zend_parse_parameters(ZEND_NUM_ARGS(),
1860-
"s|bba!a!", &file, &file_len, &exclusive,
1860+
"p|bba!a!", &file, &file_len, &exclusive,
18611861
&with_comments, &xpath_array, &ns_prefixes) == FAILURE) {
18621862
RETURN_THROWS();
18631863
}

0 commit comments

Comments
 (0)