mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
Remove length checks in get_supermicro_evt_desc()
Commit removes length checks in get_supermicro_evt_desc(), because they make no sense. Fixes out-of-bound-reads CID#1149029 and CID#1149030
This commit is contained in:
parent
fb36c69391
commit
b6ec5072f4
@ -536,7 +536,6 @@ get_supermicro_evt_desc(struct ipmi_intf *intf, struct sel_event_record *rec)
|
|||||||
int data1;
|
int data1;
|
||||||
int data2;
|
int data2;
|
||||||
int data3;
|
int data3;
|
||||||
int length;
|
|
||||||
int sensor_type;
|
int sensor_type;
|
||||||
uint8_t i = 0;
|
uint8_t i = 0;
|
||||||
uint16_t oem_id = 0;
|
uint16_t oem_id = 0;
|
||||||
@ -593,15 +592,13 @@ get_supermicro_evt_desc(struct ipmi_intf *intf, struct sel_event_record *rec)
|
|||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
length = sizeof(supermicro_X8);
|
for (i = 0; supermicro_X8[i] != 0xFFFF; i++) {
|
||||||
for (i = 0; i < length && supermicro_X8[i] != 0xFFFF; i++) {
|
|
||||||
if (oem_id == supermicro_X8[i]) {
|
if (oem_id == supermicro_X8[i]) {
|
||||||
chipset_type = 0;
|
chipset_type = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
length = sizeof(supermicro_x9);
|
for (i = 0; supermicro_x9[i] != 0xFFFF; i++) {
|
||||||
for (i = 0; i < length && supermicro_x9[i] != 0xFFFF; i++) {
|
|
||||||
if (oem_id == supermicro_x9[i]) {
|
if (oem_id == supermicro_x9[i]) {
|
||||||
chipset_type = 2;
|
chipset_type = 2;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user