remove a warning on Solaris fix a crashing bug #151111 Daniel
* parser.c: remove a warning on Solaris
* xmlschemastype.c: fix a crashing bug #151111
Daniel
diff --git a/ChangeLog b/ChangeLog
index c8b5d4a..753bccb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug 26 12:27:23 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: remove a warning on Solaris
+ * xmlschemastype.c: fix a crashing bug #151111
+
Tue Aug 24 20:49:15 MDT 2004 John Fleck <jfleck@inkstain.net>
* doc/tutorial/xmltutorial.xml, xmltutorial.pdf, *.html
diff --git a/doc/Makefile.am b/doc/Makefile.am
index adb3225..01e196e 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -55,6 +55,7 @@
libxml2.xsa: $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html
-@(if [ -x $(bindir)/xsltproc ] ; then \
+ echo "Rebuilding the NEWS file" ; \
$(bindir)/xsltproc --nonet $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html > libxml2.xsa ; fi );
$(APIPAGES): libxml2-api.xml libxml2-refs.xml $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/api.xsl
diff --git a/parser.c b/parser.c
index b55af7e..672c79c 100644
--- a/parser.c
+++ b/parser.c
@@ -7635,7 +7635,8 @@
}
SKIP(2);
- if ((tlen > 0) && (strncmp(ctxt->input->cur, ctxt->name, tlen) == 0)) {
+ if ((tlen > 0) && (strncmp(ctxt->input->cur,
+ (const char *)ctxt->name, tlen) == 0)) {
if (ctxt->input->cur[tlen] == '>') {
ctxt->input->cur += tlen + 1;
goto done;
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index f46b03c..e867054 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -1733,6 +1733,13 @@
if (type == NULL)
return (-1);
+ /*
+ * validating a non existant text node is similar to validating
+ * an empty one.
+ */
+ if (value == NULL)
+ value = BAD_CAST "";
+
if (val != NULL)
*val = NULL;
if ((flags == 0) && (value != NULL)) {
@@ -2297,7 +2304,7 @@
xmlChar *base;
int total, i = 0;
- if (cur == NULL)
+ if ((cur == NULL) || (*cur == 0))
goto return1;
while (((*cur >= '0') && (*cur <= '9')) ||