修复漏洞malloc-fail

Signed-off-by: @ran-zhao-yu <ranzhaoyu1@huawei.com>
This commit is contained in:
@ran-zhao-yu
2024-05-24 16:37:01 +08:00
parent f560cee431
commit 6ba0ebc651
2 changed files with 15 additions and 1 deletions
+13
View File
@@ -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;
+2 -1
View File
@@ -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: