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/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