Blame SOURCES/libxml2-2.9.7-CVE-2021-3516.patch

f74686
From 1358d157d0bd83be1dfe356a69213df9fac0b539 Mon Sep 17 00:00:00 2001
f74686
From: Nick Wellnhofer <wellnhofer@aevum.de>
f74686
Date: Wed, 21 Apr 2021 13:23:27 +0200
f74686
Subject: [PATCH] Fix use-after-free with `xmllint --html --push`
f74686
f74686
Call htmlCtxtUseOptions to make sure that names aren't stored in
f74686
dictionaries.
f74686
f74686
Note that this issue only affects xmllint using the HTML push parser.
f74686
f74686
Fixes #230.
f74686
---
f74686
 xmllint.c | 2 +-
f74686
 1 file changed, 1 insertion(+), 1 deletion(-)
f74686
f74686
diff --git a/xmllint.c b/xmllint.c
f74686
index 6ca1bf54..dbef273a 100644
f74686
--- a/xmllint.c
f74686
+++ b/xmllint.c
f74686
@@ -2213,7 +2213,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
f74686
             if (res > 0) {
f74686
                 ctxt = htmlCreatePushParserCtxt(NULL, NULL,
f74686
                             chars, res, filename, XML_CHAR_ENCODING_NONE);
f74686
-                xmlCtxtUseOptions(ctxt, options);
f74686
+                htmlCtxtUseOptions(ctxt, options);
f74686
                 while ((res = fread(chars, 1, pushsize, f)) > 0) {
f74686
                     htmlParseChunk(ctxt, chars, res, 0);
f74686
                 }
f74686
-- 
f74686
GitLab
f74686