When 'ipmitool sdr elist' receives unexpected message (e.g. error code instead of SDR record), ipmitool crashes. I was able to reproduce it sometimes on Dell PowerEdge 1950, but it depends on HW and its current 'mood' - sometimes BMC times out when reading SDR from slaves and ipmitool crashes.
Following patch adds necessary checks if received packet has some data to process. Signed-off-by: Jan Safranek <jsafr...@redhat.com> --- lib/ipmi_sdr.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/ipmi_sdr.c b/lib/ipmi_sdr.c index 005187f..3f340f1 100644 --- a/lib/ipmi_sdr.c +++ b/lib/ipmi_sdr.c @@ -1826,7 +1826,8 @@ ipmi_sdr_print_sensor_compact(struct ipmi_intf *intf, printf("ns | %2d.%1d | ", sensor->entity.id, sensor->entity.instance); - if (IS_SCANNING_DISABLED(rsp->data[1])) + if (rsp && rsp->data_len > 1 && + IS_SCANNING_DISABLED(rsp->data[1])) printf("Disabled"); else printf("No Reading"); ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Ipmitool-devel mailing list Ipmitool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipmitool-devel