1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-21 22:50:08 +03:00

tree: Don't allow NULL name in xmlSetNsProp

This commit is contained in:
Nick Wellnhofer 2024-03-05 04:34:59 +01:00
parent 2840e33c5e
commit d1cc6f7df2

2
tree.c

@ -6892,6 +6892,8 @@ xmlSetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name,
if (ns && (ns->href == NULL))
return(NULL);
if (name == NULL)
return(NULL);
prop = xmlGetPropNodeInternal(node, name,
(ns != NULL) ? ns->href : NULL, 0);
if (prop != NULL) {