1 Star 0 Fork 40

jeff200902/multipath-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
6012-libmultipath-fix-possible-NULL-dereference.patch 786 Bytes
一键复制 编辑 原始数据 按行查看 历史
wangjufeng 提交于 2020-01-10 17:13 . rename the package
From 7ec04256a56709963e8b954fc6036ca6ba1db137 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Tue, 8 Jan 2019 23:54:09 +0100
Subject: [PATCH] libmultipath(coverity): fix possible NULL dereference
coverity warns that recv_packet may set reply to NULL.
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
libmultipath/configure.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 39d2a956..af4d78de 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -1041,7 +1041,7 @@ int check_daemon(void)
if (recv_packet(fd, &reply, timeout) != 0)
goto out;
- if (strstr(reply, "shutdown"))
+ if (reply && strstr(reply, "shutdown"))
goto out_free;
ret = 1;
--
2.11.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jeff200902/multipath-tools.git
git@gitee.com:jeff200902/multipath-tools.git
jeff200902
multipath-tools
multipath-tools
master

搜索帮助