mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
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:
parent
14368335b2
commit
603c14274a
@ -592,7 +592,7 @@ ipmi_vita_get_led_color_capabilities(struct ipmi_intf *intf, char **argv)
|
|||||||
lprintf(LOG_ERR, "Invalid completion code received: %s",
|
lprintf(LOG_ERR, "Invalid completion code received: %s",
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
val2str(rsp->ccode, completion_code_vals));
|
||||||
return -1;
|
return -1;
|
||||||
} else if (rsp->data_len < 5) {
|
} else if (rsp->data_len < 4) {
|
||||||
lprintf(LOG_ERR, "Invalid response length %d", rsp->data_len);
|
lprintf(LOG_ERR, "Invalid response length %d", rsp->data_len);
|
||||||
return -1;
|
return -1;
|
||||||
} else if (rsp->data[0] != GROUP_EXT_VITA) {
|
} else if (rsp->data[0] != GROUP_EXT_VITA) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user