libxml2/backport-malloc-fail-Fix-buffer-overread-in-htmlParseScript.patch
zhuofeng feb7e8218d backport upstream patches
(cherry picked from commit ec64ed27a9add0f7a9bf6ee351ad67302a60c383)
2023-06-20 11:16:46 +08:00

32 lines
703 B
Diff

From 8090e5856465c0b8e26e2a080f4b498f37fa83ab Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Fri, 17 Mar 2023 12:27:07 +0100
Subject: [PATCH] malloc-fail: Fix buffer overread in htmlParseScript
Found by OSS-Fuzz, see #344.
Reference:https://github.com/GNOME/libxml2/commit/8090e5856465c0b8e26e2a080f4b498f37fa83ab
Conflict:NA
---
HTMLparser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/HTMLparser.c b/HTMLparser.c
index 6c8f180..3682807 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -3145,8 +3145,8 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
}
nbchar = 0;
}
- GROW;
NEXTL(l);
+ GROW;
cur = CUR_CHAR(l);
}
--
2.27.0