diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-09-10 15:44:31 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-09-10 15:44:31 +0200 |
commit | 36a24e9032591da8cc7688f69e7e9f5f41ffe4ab (patch) | |
tree | eec9b06cd7f4498ef4db3e2f7973e08904981c48 /lib/dimm_spd.c | |
parent | dce3efdab4ea7314a3e1db3af2cb0aac3f48dcef (diff) |
New upstream release
Diffstat (limited to 'lib/dimm_spd.c')
-rw-r--r-- | lib/dimm_spd.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/dimm_spd.c b/lib/dimm_spd.c index 41e30db..8204405 100644 --- a/lib/dimm_spd.c +++ b/lib/dimm_spd.c @@ -798,7 +798,7 @@ const struct valstr jedec_id5_vals[] = { { 0xE3, "WIS Technologies" }, { 0x64, "GateChange Technologies" }, { 0xE5, "High Density Devices AS" }, - { 0xE6, "Synopsys" }, + { 0xE6, "Synopsis" }, { 0x67, "Gigaram" }, { 0x68, "Enigma Semiconductor Inc." }, { 0xE9, "Century Micro Inc." }, @@ -1621,7 +1621,7 @@ ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id) struct ipmi_rq req; struct fru_info fru; uint8_t *spd_data, msg_data[4]; - int len, offset; + uint32_t len, offset; msg_data[0] = id; @@ -1697,6 +1697,13 @@ ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id) } len = rsp->data[0]; + if(rsp->data_len < 1 + || len > rsp->data_len - 1 + || len > fru.size - offset) + { + printf(" Not enough buffer size"); + return -1; + } memcpy(&spd_data[offset], rsp->data + 1, len); offset += len; } while (offset < fru.size); |