Skip to content

Commit 3e7672c

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: xml: Use safe_emalloc() correctly
2 parents 0375060 + 0909f13 commit 3e7672c

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
@@ -98,7 +98,7 @@ start_element_handler_ns(void *user, const xmlChar *name, const xmlChar *prefix,
9898

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

103103
for (i = 0; i < nb_attributes; i += 1) {
104104

0 commit comments

Comments
 (0)