代码拉取完成,页面将自动刷新
From 1aabc9db40dc5ec1f8f22c09e74c63dda53f7ed6 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <[email protected]>
Date: Sun, 22 Jan 2023 13:20:15 +0100
Subject: [PATCH] malloc-fail: Fix null deref in xmlBufResize
Found with libFuzzer, see #344.
Reference:https://github.com/GNOME/libxml2/commit/1aabc9db40dc5ec1f8f22c09e74c63dda53f7ed6
Conflict:NA
---
buf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/buf.c b/buf.c
index e851364..69370b7 100644
--- a/buf.c
+++ b/buf.c
@@ -821,7 +821,8 @@ xmlBufResize(xmlBufPtr buf, size_t size)
if (buf->content == NULL) {
rebuf = (xmlChar *) xmlMallocAtomic(newSize);
buf->use = 0;
- rebuf[buf->use] = 0;
+ if (rebuf != NULL)
+ rebuf[buf->use] = 0;
} else if (buf->size - buf->use < 100) {
rebuf = (xmlChar *) xmlRealloc(buf->content, newSize);
} else {
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。