[libxml2] Halt parser in case of encoding error



commit ab362ab0ad3af54406ae8237a525405c6e2a705b
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Jan 22 15:40:05 2018 +0100

    Halt parser in case of encoding error
    
    Should fix crbug.com/793715, although I wasn't able to reproduce the
    issue.

 parser.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/parser.c b/parser.c
index d1ce8b5..5e800e1 100644
--- a/parser.c
+++ b/parser.c
@@ -12218,6 +12218,7 @@ xmldecl_done:
                    /* TODO 2.6.0 */
                    xmlGenericError(xmlGenericErrorContext,
                                    "xmlParseChunk: encoder error\n");
+                    xmlHaltParser(ctxt);
                    return(XML_ERR_INVALID_ENCODING);
                }
                xmlBufSetInputBaseCur(in->buffer, ctxt->input, base, current);


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