summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2016-05-12 13:52:47 -0500
committerAdriana Kobylak <anoo@us.ibm.com>2016-05-16 14:36:04 -0500
commit81aecc6b41c3214abf9038b2f63e9edc1f681e56 (patch)
tree72822b9412de26a1dc61fa3dba46d4fff7aa4785
parenta14239a201443222906864273449a39cfa84118e (diff)
downloadipmi-fru-parser-81aecc6b41c3214abf9038b2f63e9edc1f681e56.tar.gz
ipmi-fru-parser-81aecc6b41c3214abf9038b2f63e9edc1f681e56.zip
Replace uint8_t buffer length variable with size_t
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 size_t, but the function using it crops it to uint8_t which doesn't fit the extended size. Changing the function to use size_t. Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
-rw-r--r--frup.c2
-rw-r--r--frup.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/frup.c b/frup.c
index 7bdf35f..49718ba 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 size_t len, sd_bus_message* vpdtbl)
{
int ret = 0;
int rv = -1;
diff --git a/frup.h b/frup.h
index 8400951..64a0562 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 size_t len, sd_bus_message* vpdtbl);
#ifdef __cplusplus
}
OpenPOWER on IntegriCloud