From 7718d53612105ea2325a751af111d2136f0f37cf Mon Sep 17 00:00:00 2001 From: Xingrui Yi Date: Tue, 24 Sep 2024 14:11:51 +0800 Subject: [PATCH] [devel-8.2][Hygon][HCT] Fix for vfio based mediated hct Fix for vfio based mediated hct in index_value Signed-off-by: Mingkai Xu --- hw/vfio/hct.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vfio/hct.c b/hw/vfio/hct.c index fb429271bb4..2f40bf5c939 100644 --- a/hw/vfio/hct.c +++ b/hw/vfio/hct.c @@ -248,6 +248,7 @@ static int hct_get_ccp_index(HCTDevState *state) return -errno; } + memset(buf, 0, sizeof(buf)); ret = read(fd, buf, sizeof(buf)); if (ret < 0) { ret = -errno; -- Gitee