1 Star 0 Fork 70

周正亮/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
remote_driver-fix-the-UAF-causing-UnicodeDecodeError.patch 835 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 10ec4fa6e9f1e6c72f2d7a1025d1e200ce94f8b0 Mon Sep 17 00:00:00 2001
From: caozhongwang <caozhongwang1@huawei.com>
Date: Sat, 18 May 2024 17:05:07 +0800
Subject: [PATCH] remote_driver: fix the UAF causing "UnicodeDecodeError:
'utf-8' codec can't decode byte XXX".
Signed-off-by:xiuqing1 <xiuqing1@huawei.com>
---
src/remote/remote_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index a1a0edd7a2..9350e811d6 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -1408,7 +1408,7 @@ remoteConnectGetType(virConnectPtr conn)
return NULL;
/* Stash. */
- return priv->type = ret.type;
+ return priv->type = g_steal_pointer(&ret.type);
}
static int remoteConnectIsSecure(virConnectPtr conn)
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhou-zhengliang/libvirt.git
git@gitee.com:zhou-zhengliang/libvirt.git
zhou-zhengliang
libvirt
libvirt
master

搜索帮助