From 603c14274ae6f8cd0bda93ff11795b347033ec74 Mon Sep 17 00:00:00 2001 From: Dmitry Bazhenov Date: Fri, 30 Oct 2015 17:33:18 +0500 Subject: [PATCH] ID:396 - Fixed invalid length check in picmg led cap command. 'picmg led cap' command expects FRU LED Capabilities response length 5 bytes minimum (excluding the completion code byte), while it is only 4 bytes long. This patch makes the command expect 4 bytes instead. --- lib/ipmi_vita.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ipmi_vita.c b/lib/ipmi_vita.c index 45ddd3e..3900974 100644 --- a/lib/ipmi_vita.c +++ b/lib/ipmi_vita.c @@ -592,7 +592,7 @@ ipmi_vita_get_led_color_capabilities(struct ipmi_intf *intf, char **argv) lprintf(LOG_ERR, "Invalid completion code received: %s", val2str(rsp->ccode, completion_code_vals)); return -1; - } else if (rsp->data_len < 5) { + } else if (rsp->data_len < 4) { lprintf(LOG_ERR, "Invalid response length %d", rsp->data_len); return -1; } else if (rsp->data[0] != GROUP_EXT_VITA) {