1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2026-01-26 21:41:34 +03:00

Fix C14N type confusion

Do not try to get nsDef with xmlDoc

Fix https://gitlab.gnome.org/GNOME/libxml2/-/issues/1016
This commit is contained in:
Daniel Garcia Moreno
2025-11-18 08:10:35 +01:00
committed by Daniel Garcia Moreno
parent 05b0c03006
commit 8c5e54d5bd

2
c14n.c
View File

@@ -598,7 +598,7 @@ xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
}
/* check all namespaces */
for(n = cur; n != NULL; n = n->parent) {
for(n = cur; n != NULL && n->type == XML_ELEMENT_NODE; n = n->parent) {
for(ns = n->nsDef; ns != NULL; ns = ns->next) {
tmp = xmlSearchNs(cur->doc, cur, ns->prefix);