1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-19 14:50:07 +03:00

tree: Improve argument check in xmlTextConcat

This commit is contained in:
Nick Wellnhofer 2024-03-05 14:53:35 +01:00
parent 16c2955733
commit d57c57ed2f

2
tree.c
View File

@ -6980,6 +6980,8 @@ xmlIsBlankNode(const xmlNode *node) {
int
xmlTextConcat(xmlNodePtr node, const xmlChar *content, int len) {
if (node == NULL) return(-1);
if ((content == NULL) || (len <= 0))
return(0);
if ((node->type != XML_TEXT_NODE) &&
(node->type != XML_CDATA_SECTION_NODE) &&