1 Star 0 Fork 40

jeff200902/multipath-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
6010-libmultipath-fix-int-overflow-in-sysfs_set_scsi_tmo.patch 901 Bytes
一键复制 编辑 原始数据 按行查看 历史
wangjufeng 提交于 2020-01-10 17:13 . rename the package
From 3044fc0bd953faf71bfa6ebd98f2084f6ae1772b Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Tue, 8 Jan 2019 23:54:04 +0100
Subject: [PATCH] libmultipath(coverity): fix int overflow in
sysfs_set_scsi_tmo
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
libmultipath/discovery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 3fd79a36..1748eebb 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -711,7 +711,7 @@ sysfs_set_scsi_tmo (struct multipath *mpp, int checkint)
int dev_loss_tmo = mpp->dev_loss;
if (mpp->no_path_retry > 0) {
- uint64_t no_path_retry_tmo = mpp->no_path_retry * checkint;
+ uint64_t no_path_retry_tmo = (uint64_t)mpp->no_path_retry * checkint;
if (no_path_retry_tmo > MAX_DEV_LOSS_TMO)
no_path_retry_tmo = MAX_DEV_LOSS_TMO;
--
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

搜索帮助