From 73c50805d9302263a1118356bc2553b441b31b33 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Mon, 26 Oct 2015 18:33:14 +0800 Subject: Correct spelling of "calling" --- xmlschemas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmlschemas.c b/xmlschemas.c index d47512f0..fe533e6f 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -25546,7 +25546,7 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) if (xmlNewProp(defAttrOwnerElem, iattr->localName, value) == NULL) { VERROR_INT("xmlSchemaVAttributesComplex", - "callling xmlNewProp()"); + "calling xmlNewProp()"); if (normValue != NULL) xmlFree(normValue); goto internal_error; -- cgit v1.2.3 From 41ac9049a27f52e7a1f3b341f8714149fc88d450 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Tue, 27 Oct 2015 10:53:44 +0800 Subject: Fix an error in previous Conditional section patch an off by one mistake in the change, led to error on correct document where the end of the included entity was exactly the end of the conditional section, leading to regtest failure --- parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.c b/parser.c index b9217ff1..d67b3003 100644 --- a/parser.c +++ b/parser.c @@ -6916,7 +6916,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) { NULL, NULL); } if ((ctxt-> instate != XML_PARSER_EOF) && - ((ctxt->input->cur + 3) < ctxt->input->end)) + ((ctxt->input->cur + 3) <= ctxt->input->end)) SKIP(3); } } -- cgit v1.2.3 From e724879d964d774df9b7969fc846605aa1bac54c Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Fri, 30 Oct 2015 21:14:55 +0800 Subject: Fix parsing short unclosed comment uninitialized access For https://bugzilla.gnome.org/show_bug.cgi?id=746048 The HTML parser was too optimistic when processing comments and didn't check for the end of the stream on the first 2 characters --- HTMLparser.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/HTMLparser.c b/HTMLparser.c index 19c10c3f..bdf78071 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -3264,12 +3264,17 @@ htmlParseComment(htmlParserCtxtPtr ctxt) { ctxt->instate = state; return; } + len = 0; + buf[len] = 0; q = CUR_CHAR(ql); + if (!IS_CHAR(q)) + goto unfinished; NEXTL(ql); r = CUR_CHAR(rl); + if (!IS_CHAR(r)) + goto unfinished; NEXTL(rl); cur = CUR_CHAR(l); - len = 0; while (IS_CHAR(cur) && ((cur != '>') || (r != '-') || (q != '-'))) { @@ -3300,18 +3305,20 @@ htmlParseComment(htmlParserCtxtPtr ctxt) { } } buf[len] = 0; - if (!IS_CHAR(cur)) { - htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED, - "Comment not terminated \n