- hw/arm/virt:Keep Guest L1 cache type consistent with KVM - cvm : Add support for TEE-based national encryption acceleration. - Add virtCCA Coda annotation Adjust the position of the security device - target/i386: sev: Add support for reuse ASID for different CSV guests - target/i386: sev: Fix incompatibility between SEV and CSV on the GET_ID API - hw/cxl: Ensure there is enough data for the header in cmd_ccls_set_lsa() - hw/pci: Add parenthesis to PCI_BUILD_BDF macro - hw/audio/hda: free timer on exit - meson.build: Remove ncurses workaround for OpenBSD - ui/console-vc: Silence warning about sprintf() on OpenBSD - ui: remove break after g_assert_not_reached() - s390x/sclp: Simplify get_sclp_device() - hw/vfio/hct: qemu startup terminate once error happened in hct - hw/vfio/hct: fix ccp_index error caused by uninitialized buf - hw/vfio/hct: update support ccp count to 48. - hw/vfio: add device hct based on vfio. Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com> (cherry picked from commit 702a9cc4e262a50f7aa6f7c9549fbc13d4cd0770)
29 lines
789 B
Diff
29 lines
789 B
Diff
From 360bd43ff3c4e4938ee8af1a5ccf981152f7ca95 Mon Sep 17 00:00:00 2001
|
|
From: yangdepei <yangdepei@hygon.cn>
|
|
Date: Mon, 26 Aug 2024 15:40:25 +0800
|
|
Subject: [PATCH] hw/vfio/hct: fix ccp_index error caused by uninitialized buf
|
|
|
|
Signed-off-by: yangdepei <yangdepei@hygon.cn>
|
|
---
|
|
hw/vfio/hct.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/hw/vfio/hct.c b/hw/vfio/hct.c
|
|
index 790bb78439..9374e95e85 100644
|
|
--- a/hw/vfio/hct.c
|
|
+++ b/hw/vfio/hct.c
|
|
@@ -235,8 +235,8 @@ static int hct_check_duplicated_index(int index)
|
|
|
|
static int hct_get_ccp_index(HCTDevState *state)
|
|
{
|
|
- char path[PATH_MAX];
|
|
- char buf[CCP_INDEX_BYTES];
|
|
+ char path[PATH_MAX] = {0};
|
|
+ char buf[CCP_INDEX_BYTES] = {0};
|
|
int fd;
|
|
int ret;
|
|
int ccp_index;
|
|
--
|
|
2.41.0.windows.1
|
|
|