libxml2 r3718 - trunk



Author: veillard
Date: Wed Mar 26 17:41:38 2008
New Revision: 3718
URL: http://svn.gnome.org/viewvc/libxml2?rev=3718&view=rev

Log:
* parser.c: changes based on  Alex Khesin patch where xmlParseCharRef
  seems to not be checked correctly, fixes #520198
Daniel


Modified:
   trunk/ChangeLog
   trunk/parser.c

Modified: trunk/parser.c
==============================================================================
--- trunk/parser.c	(original)
+++ trunk/parser.c	Wed Mar 26 17:41:38 2008
@@ -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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]