1 Star 0 Fork 12

靳智敏/ipmitool

forked from src-openEuler/ipmitool 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fru-internaluse-Fix-segmentation-fault-9.patch 967 Bytes
一键复制 编辑 原始数据 按行查看 历史
hexiaowen 提交于 2019-09-30 10:53 . Package init
From 564aef2aff5a0ed9b0c4024c82f846c8633253f4 Mon Sep 17 00:00:00 2001
From: Hnan-Ting Lo <kylix0713@gmail.com>
Date: Wed, 30 May 2018 23:31:24 +0800
Subject: [PATCH 026/119] fru: internaluse: Fix segmentation fault (#9)
A segmentation fault was trigged by executing 'ipmitool fru internaluse 1 info'.
A memset() was attempted on the address of a pointer, not on the pointer itself.
The erroneous memset() is removed with this commit because it duplicates
the memset() in line 4072.
Resolves ipmitool/ipmitool#9
Signed-off-by: Kylix Lo <kylix0713@gmail.com>
---
lib/ipmi_fru.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c
index 42c1f19..6115ae6 100644
--- a/lib/ipmi_fru.c
+++ b/lib/ipmi_fru.c
@@ -4095,7 +4095,6 @@ ipmi_fru_get_internal_use_info( struct ipmi_intf * intf,
return -1;
}
- memset(&fru, 0, sizeof(fru));
fru->size = (rsp->data[1] << 8) | rsp->data[0];
fru->access = rsp->data[2] & 0x1;
--
2.19.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jinzhimin369/ipmitool.git
git@gitee.com:jinzhimin369/ipmitool.git
jinzhimin369
ipmitool
ipmitool
master

搜索帮助