Fixed a segfault during text concatenation when validating a node tree:
* xmlschemas.c xmlstring.c: Fixed a segfault during
text concatenation when validating a node tree:
xmlStrncat was called with a @len of -1; but unlike
xmlStrncatNew, it does not calculate the length
automatically in such a case (reported by Judy Hay
on the mailing list).
Updated the descriptions of the involved string
functions to note this.
diff --git a/xmlschemas.c b/xmlschemas.c
index f7f7567..9518999 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -26336,7 +26336,9 @@
default:
break;
}
- } else {
+ } else {
+ if (len < 0)
+ len = xmlStrlen(value);
/*
* Concat the value.
*/