mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
ID: 3600930 - 'lib/ipmi_sdr.c' - NULL dereference
Commit fixes NULL dereference in 'lib/ipmi_sdr.c' by checking whether Sensor is type of 'full' or 'compact'. Fix by: Jim Mank Reported by: Ales Ledvinka
This commit is contained in:
parent
bd4f34b035
commit
c070fc00d6
@ -1804,10 +1804,12 @@ ipmi_sdr_print_sensor_fc(struct ipmi_intf *intf,
|
|||||||
SENSOR_PRINT_THRESH(sr->full, "Lower non-critical", lower.non_critical, lnc);
|
SENSOR_PRINT_THRESH(sr->full, "Lower non-critical", lower.non_critical, lnc);
|
||||||
}
|
}
|
||||||
ipmi_sdr_print_sensor_hysteresis(sensor, sr->full,
|
ipmi_sdr_print_sensor_hysteresis(sensor, sr->full,
|
||||||
sr->full->threshold.hysteresis.positive, "Positive Hysteresis");
|
sr->full ? sr->full->threshold.hysteresis.positive :
|
||||||
|
sr->compact->threshold.hysteresis.positive, "Positive Hysteresis");
|
||||||
|
|
||||||
ipmi_sdr_print_sensor_hysteresis(sensor, sr->full,
|
ipmi_sdr_print_sensor_hysteresis(sensor, sr->full,
|
||||||
sr->full->threshold.hysteresis.negative, "Negative Hysteresis");
|
sr->full ? sr->full->threshold.hysteresis.negative :
|
||||||
|
sr->compact->threshold.hysteresis.negative, "Negative Hysteresis");
|
||||||
|
|
||||||
print_sensor_min_max(sr->full);
|
print_sensor_min_max(sr->full);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user