[PATCH ipmi-fru-parser] Increase size of buffer length variable
OpenBMC Patches
openbmc-patches at stwcx.xyz
Fri May 13 05:10:19 AEST 2016
From: Adriana Kobylak <anoo at us.ibm.com>
The latest Barreleye vpd contains additional custom fields in one
of the board sections, pushing the size of the buffer over 0x100.
The current variable that stores the buffer size is set to be
uint8_t which doesn't fit the extended size. Changing it to uint32_t.
Signed-off-by: Adriana Kobylak <anoo at us.ibm.com>
---
fru-area.H | 4 ++--
frup.c | 2 +-
frup.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fru-area.H b/fru-area.H
index 82206bb..058e438 100644
--- a/fru-area.H
+++ b/fru-area.H
@@ -26,7 +26,7 @@ class ipmi_fru
std::string iv_name;
// Length of a specific fru area.
- size_t iv_len;
+ uint32_t iv_len;
// Special bit for BMC readable eeprom only.
bool iv_bmc_fru;
@@ -94,7 +94,7 @@ class ipmi_fru
}
// Returns the length.
- size_t get_len() const
+ uint32_t get_len() const
{
return iv_len;
}
diff --git a/frup.c b/frup.c
index 7bdf35f..4df7266 100644
--- a/frup.c
+++ b/frup.c
@@ -948,7 +948,7 @@ parse_fru (const void* msgbuf, sd_bus_message* vpdtbl)
return (rv);
}
-int parse_fru_area (const uint8_t area, const void* msgbuf, const uint8_t len, sd_bus_message* vpdtbl)
+int parse_fru_area (const uint8_t area, const void* msgbuf, const uint32_t len, sd_bus_message* vpdtbl)
{
int ret = 0;
int rv = -1;
diff --git a/frup.h b/frup.h
index 8400951..094d223 100644
--- a/frup.h
+++ b/frup.h
@@ -10,7 +10,7 @@ extern "C"
/* Parse an IPMI write fru data message into a dictionary containing name value pair of VPD entries.*/
int parse_fru (const void* msgbuf, sd_bus_message* vpdtbl);
-int parse_fru_area (const uint8_t area, const void* msgbuf, const uint8_t len, sd_bus_message* vpdtbl);
+int parse_fru_area (const uint8_t area, const void* msgbuf, const uint32_t len, sd_bus_message* vpdtbl);
#ifdef __cplusplus
}
--
2.8.1
More information about the openbmc
mailing list