mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
valid: Check for NULL node->name in xmlSnprintfElements
Unfortunately, we can have NULL element names if xmlSetTreeDoc fails.
This commit is contained in:
3
valid.c
3
valid.c
@@ -5020,7 +5020,8 @@ xmlSnprintfElements(char *buf, int size, xmlNodePtr node, int glob) {
|
|||||||
strcat(buf, " ...");
|
strcat(buf, " ...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
strcat(buf, (char *) cur->name);
|
if (cur->name != NULL)
|
||||||
|
strcat(buf, (char *) cur->name);
|
||||||
if (cur->next != NULL)
|
if (cur->next != NULL)
|
||||||
strcat(buf, " ");
|
strcat(buf, " ");
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user