1 Star 0 Fork 131

xiaoyuliang/qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
hw-vfio-hct-fix-ccp_index-error-caused-by-uninitiali.patch 789 Bytes
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2024-11-30 08:43 +08:00 . QEMU update to version 8.2.0-25:
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xiao-yuliang/qemu.git
git@gitee.com:xiao-yuliang/qemu.git
xiao-yuliang
qemu
qemu
master

搜索帮助