mirror of
https://https.git.savannah.gnu.org/git/gettext.git
synced 2026-01-26 15:39:11 +00:00
its: Fix NULL dereference (regression 2024-10-01).
* gettext-tools/src/its.c (_its_copy_node_with_attributes): Handle attributes without namespace correctly.
This commit is contained in:
parent
376beb46f0
commit
c0e43492f3
@ -1989,7 +1989,9 @@ _its_copy_node_with_attributes (xmlNode *node)
|
||||
if (strcmp ((const char *) attr_name, "id") != 0)
|
||||
{
|
||||
xmlNs *attr_ns = attributes->ns;
|
||||
xmlChar *attr_value = xmlGetNsProp (node, attr_name, attr_ns->href);
|
||||
xmlChar *attr_value =
|
||||
xmlGetNsProp (node, attr_name,
|
||||
attr_ns != NULL ? attr_ns->href : NULL);
|
||||
xmlNewNsProp (copy, attr_ns, attr_name, attr_value);
|
||||
xmlFree (attr_value);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user