mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
ID:358 - check data length in else branch of ipmi_spd_print()
Commit adds data length check into '} else {' branch of ipmi_spd_print() in order to avoid out-of-bound access.
This commit is contained in:
parent
9811f79eae
commit
d9acbc4cd0
@ -950,6 +950,9 @@ ipmi_spd_print(uint8_t *spd_data, int len)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (len < 100) {
|
||||
return (-1);
|
||||
}
|
||||
ii = (spd_data[3] & 0x0f) + (spd_data[4] & 0x0f) - 17;
|
||||
k = ((spd_data[5] & 0x7) + 1) * spd_data[17];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user