diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2016-05-12 13:52:47 -0500 |
---|---|---|
committer | Adriana Kobylak <anoo@us.ibm.com> | 2016-05-16 14:36:04 -0500 |
commit | 81aecc6b41c3214abf9038b2f63e9edc1f681e56 (patch) | |
tree | 72822b9412de26a1dc61fa3dba46d4fff7aa4785 | |
parent | a14239a201443222906864273449a39cfa84118e (diff) | |
download | ipmi-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.c | 2 | ||||
-rw-r--r-- | frup.h | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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; @@ -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 } |