components/libxml2/patches/Bug744980-1.patch
branchs11u3-sru
changeset 5253 18fb16d332d3
parent 5249 8a7aa7f8367e
child 5254 ac45b54ae7b5
equal deleted inserted replaced
5249:8a7aa7f8367e 5253:18fb16d332d3
     1 Patch origin: upstream
       
     2 Patch status: will be part of next version
       
     3 
       
     4 From a7dfab7411cbf545f359dd3157e5df1eb0e7ce31 Mon Sep 17 00:00:00 2001
       
     5 From: Daniel Veillard <[email protected]>
       
     6 Date: Mon, 23 Feb 2015 11:17:35 +0800
       
     7 Subject: Stop parsing on entities boundaries errors
       
     8 
       
     9 For https://bugzilla.gnome.org/show_bug.cgi?id=744980
       
    10 
       
    11 There are times, like on unterminated entities that it's preferable to
       
    12 stop parsing, even if that means less error reporting. Entities are
       
    13 feeding the parser on further processing, and if they are ill defined
       
    14 then it's possible to get the parser to bug. Also do the same on
       
    15 Conditional Sections if the input is broken, as the structure of
       
    16 the document can't be guessed.
       
    17 
       
    18 diff --git a/parser.c b/parser.c
       
    19 index a8d1b67..bbe97eb 100644
       
    20 --- a/parser.c
       
    21 +++ b/parser.c
       
    22 @@ -5658,6 +5658,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
       
    23  	if (RAW != '>') {
       
    24  	    xmlFatalErrMsgStr(ctxt, XML_ERR_ENTITY_NOT_FINISHED,
       
    25  	            "xmlParseEntityDecl: entity %s not terminated\n", name);
       
    26 +	    xmlStopParser(ctxt);
       
    27  	} else {
       
    28  	    if (input != ctxt->input) {
       
    29  		xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
       
    30 -- 
       
    31 cgit v0.10.2
       
    32