[libxml2] Fix use-after-free with `xmllint --html --push`



commit 1358d157d0bd83be1dfe356a69213df9fac0b539
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Wed Apr 21 13:23:27 2021 +0200

    Fix use-after-free with `xmllint --html --push`
    
    Call htmlCtxtUseOptions to make sure that names aren't stored in
    dictionaries.
    
    Note that this issue only affects xmllint using the HTML push parser.
    
    Fixes #230.

 xmllint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/xmllint.c b/xmllint.c
index 6ca1bf54..dbef273a 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -2213,7 +2213,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
             if (res > 0) {
                 ctxt = htmlCreatePushParserCtxt(NULL, NULL,
                             chars, res, filename, XML_CHAR_ENCODING_NONE);
-                xmlCtxtUseOptions(ctxt, options);
+                htmlCtxtUseOptions(ctxt, options);
                 while ((res = fread(chars, 1, pushsize, f)) > 0) {
                     htmlParseChunk(ctxt, chars, res, 0);
                 }


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