From 6ba0ebc651620ff545b5aab661c17631bb4c1a8c Mon Sep 17 00:00:00 2001 From: "@ran-zhao-yu" Date: Fri, 24 May 2024 16:37:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=BC=8F=E6=B4=9Emalloc-fail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @ran-zhao-yu --- Fix-malloc-fail.patch | 13 +++++++++++++ install.py | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 Fix-malloc-fail.patch diff --git a/Fix-malloc-fail.patch b/Fix-malloc-fail.patch new file mode 100644 index 0000000..e8ec411 --- /dev/null +++ b/Fix-malloc-fail.patch @@ -0,0 +1,13 @@ +diff --git a/buf.c b/buf.c +index 40a5ee06..1fa975a6 100644 +--- a/buf.c ++++ b/buf.c +@@ -1265,7 +1265,7 @@ xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer) { + */ + int + xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input) { +- if ((input == NULL) || (buf == NULL) || (buf->error)) ++ if ((input == NULL) || (buf == NULL)) + return(-1); + CHECK_COMPAT(buf) + input->base = input->cur = buf->content; \ No newline at end of file diff --git a/install.py b/install.py index 4a3b1d2..bedc0c3 100755 --- a/install.py +++ b/install.py @@ -228,7 +228,8 @@ def do_patch(args, target_dir): "backport-Fix-use-after-free-in-xmlParseContentInternal.patch", "backport-malloc-fail-Fix-null-deref-after-xmlXIncludeNewRef.patch", "backport-xpath-Ignore-entity-ref-nodes-when-computing-node-ha.patch", - "backport-SAX-Always-initialize-SAX1-element-handlers.patch" + "backport-SAX-Always-initialize-SAX1-element-handlers.patch", + "Fix-malloc-fail.patch" ] for patch in patch_file: -- Gitee