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.
This commit is contained in:
Dmitry Bazhenov 2015-10-30 17:33:18 +05:00 committed by Zdenek Styblik
parent 14368335b2
commit 603c14274a

View File

@ -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) {