Skip to content

Commit 0909f13

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: xml: Use safe_emalloc() correctly
2 parents e1c8ed6 + 835c6c7 commit 0909f13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/xml/compat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ start_element_handler_ns(void *user, const xmlChar *name, const xmlChar *prefix,
9595

9696
if (attributes != NULL) {
9797
xmlChar *qualified_name_attr = NULL;
98-
attrs = safe_emalloc((nb_attributes * 2) + 1, sizeof(int *), 0);
98+
attrs = safe_emalloc(nb_attributes, 2 * sizeof(int *), sizeof(int *));
9999

100100
for (i = 0; i < nb_attributes; i += 1) {
101101

0 commit comments

Comments
 (0)