We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a7fd6fc + 48b19a8 commit 835c6c7Copy full SHA for 835c6c7
1 file changed
ext/xml/compat.c
@@ -95,7 +95,7 @@ start_element_handler_ns(void *user, const xmlChar *name, const xmlChar *prefix,
95
96
if (attributes != NULL) {
97
xmlChar *qualified_name_attr = NULL;
98
- attrs = safe_emalloc((nb_attributes * 2) + 1, sizeof(int *), 0);
+ attrs = safe_emalloc(nb_attributes, 2 * sizeof(int *), sizeof(int *));
99
100
for (i = 0; i < nb_attributes; i += 1) {
101
0 commit comments