mirror of
https://git.yoctoproject.org/poky
synced 2026-03-04 14:29:40 +01:00
Upstream-Status: Backport [1358d157d0]
(From OE-Core rev: 29c182375d91806d1e802b026f84b24e7c5d4b35)
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
From 1358d157d0bd83be1dfe356a69213df9fac0b539 Mon Sep 17 00:00:00 2001
|
|
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
|
Date: Wed, 21 Apr 2021 13:23:27 +0200
|
|
Subject: [PATCH] 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.
|
|
|
|
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/1358d157d0bd83be1dfe356a69213df9fac0b539]
|
|
CVE: CVE-2021-3516
|
|
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
|
---
|
|
xmllint.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/xmllint.c b/xmllint.c
|
|
index 6ca1bf54d..dbef273a8 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);
|
|
}
|
|
--
|
|
GitLab
|
|
|