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:
committed by
Daniel Garcia Moreno
parent
05b0c03006
commit
8c5e54d5bd
2
c14n.c
2
c14n.c
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user