changes based on Alex Khesin patch where xmlParseCharRef seems to not be
* parser.c: changes based on Alex Khesin patch where xmlParseCharRef
seems to not be checked correctly, fixes #520198
Daniel
svn path=/trunk/; revision=3718
diff --git a/ChangeLog b/ChangeLog
index 9239070..63b59b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Mar 26 18:39:58 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: changes based on Alex Khesin patch where xmlParseCharRef
+ seems to not be checked correctly, fixes #520198
+
Wed Mar 26 15:03:49 CET 2008 Daniel Veillard <daniel@veillard.com>
* parser.c: patch from Ashwin to avoid a problem of attribute
diff --git a/parser.c b/parser.c
index 27db3c6..e0f30e7 100644
--- a/parser.c
+++ b/parser.c
@@ -3255,7 +3255,7 @@
buf[len++] = '8';
buf[len++] = ';';
}
- } else {
+ } else if (val != 0) {
if (len > buf_size - 10) {
growBuffer(buf);
}
@@ -6098,6 +6098,8 @@
int hex = NXT(2);
int value = xmlParseCharRef(ctxt);
+ if (value == 0)
+ return;
if (ctxt->charset != XML_CHAR_ENCODING_UTF8) {
/*
* So we are using non-UTF-8 buffers