From 1593341ed77f47c50fc39c8701bc65bc5c3705b7 Mon Sep 17 00:00:00 2001 From: Francois Isabelle Date: Thu, 23 Oct 2008 17:13:25 +0000 Subject: [PATCH] Fixed "Watchdog Timer Use" display - Added mask to avoid wtd_use_string overrun --- ipmitool/lib/ipmi_mc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipmitool/lib/ipmi_mc.c b/ipmitool/lib/ipmi_mc.c index 687313b..776d41a 100644 --- a/ipmitool/lib/ipmi_mc.c +++ b/ipmitool/lib/ipmi_mc.c @@ -605,7 +605,7 @@ ipmi_mc_get_watchdog(struct ipmi_intf * intf) wdt_res = (struct ipm_get_watchdog_rsp *) rsp->data; printf("Watchdog Timer Use: %s (0x%02x)\n", - wdt_use_string[wdt_res->timer_use], wdt_res->timer_use); + wdt_use_string[(wdt_res->timer_use & 0x07 )], wdt_res->timer_use); printf("Watchdog Timer Is: %s\n", wdt_res->timer_use & 0x40 ? "Started/Running" : "Stopped"); printf("Watchdog Timer Actions: %s (0x%02x)\n",