From: Zdenek S. <st...@us...> - 2013-02-05 06:57:47
|
Update of /cvsroot/ipmitool/ipmitool/lib In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv24908/lib Modified Files: ipmi_sdr.c Log Message: 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 Index: ipmi_sdr.c =================================================================== RCS file: /cvsroot/ipmitool/ipmitool/lib/ipmi_sdr.c,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** ipmi_sdr.c 5 Feb 2013 06:51:43 -0000 1.108 --- ipmi_sdr.c 5 Feb 2013 06:57:44 -0000 1.109 *************** *** 1805,1812 **** } ipmi_sdr_print_sensor_hysteresis(sensor, sr->full, ! sr->full->threshold.hysteresis.positive, "Positive Hysteresis"); ipmi_sdr_print_sensor_hysteresis(sensor, sr->full, ! sr->full->threshold.hysteresis.negative, "Negative Hysteresis"); print_sensor_min_max(sr->full); --- 1805,1814 ---- } ipmi_sdr_print_sensor_hysteresis(sensor, sr->full, ! sr->full ? sr->full->threshold.hysteresis.positive : ! sr->compact->threshold.hysteresis.positive, "Positive Hysteresis"); ipmi_sdr_print_sensor_hysteresis(sensor, sr->full, ! sr->full ? sr->full->threshold.hysteresis.negative : ! sr->compact->threshold.hysteresis.negative, "Negative Hysteresis"); print_sensor_min_max(sr->full); |