代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 6c70b9987df7b3c2e82b88513ad6f5ebbe87065a Mon Sep 17 00:00:00 2001
From: Tim Wiederhake <twiederh@redhat.com>
Date: Thu, 22 Jul 2021 10:30:21 +0200
Subject: [PATCH 095/108] virFileReadLimFD: Cast maxlen to size_t before adding
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
If the function is called with maxlen equal to `INT_MAX`, adding
one will trigger a signed integer overflow.
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit 2ed93ed979170c3310ace5cdf75a99873ba9d317)
---
src/util/virfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virfile.c b/src/util/virfile.c
index 20260a2e58..74eae7658e 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -1423,7 +1423,7 @@ virFileReadLimFD(int fd, int maxlen, char **buf)
errno = EINVAL;
return -1;
}
- s = saferead_lim(fd, maxlen+1, &len);
+ s = saferead_lim(fd, (size_t) maxlen + 1, &len);
if (s == NULL)
return -1;
if (len > maxlen || (int)len != len) {
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。