summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Venture <pstrinkle@users.noreply.github.com>2021-09-15 07:58:49 -0700
committerAlexander Amelkin <mocbuhtig@amelkin.msk.ru>2022-02-05 23:40:08 +0300
commita24a512bdd57ffa8813294e80ad7159cd9d73e55 (patch)
tree8fbd9cadaf80d8bbf0f9a2450c13c0952cccfb26
parent39ca56bf33975b8a8b7e87928d67dc66366161da (diff)
downloadipmitool-a24a512bdd57ffa8813294e80ad7159cd9d73e55.tar.gz
zero initialize the recv structure on the stack
This was caught via a sanitized build where the recv was used with stack data in some cases.
-rw-r--r--src/plugins/open/open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/open/open.c b/src/plugins/open/open.c
index 4f2e1b2..39c8ea2 100644
--- a/src/plugins/open/open.c
+++ b/src/plugins/open/open.c
@@ -170,7 +170,7 @@ static
struct ipmi_rs *
ipmi_openipmi_send_cmd(struct ipmi_intf *intf, struct ipmi_rq *req)
{
- struct ipmi_recv recv;
+ struct ipmi_recv recv = {};
struct ipmi_addr addr;
struct ipmi_system_interface_addr bmc_addr = {
.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE,