summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2016-12-13 10:09:08 -0600
committerAdriana Kobylak <anoo@us.ibm.com>2016-12-13 10:10:59 -0600
commit88ad815d276ee70e5e09e700ecca5014230a1672 (patch)
tree75b9d959aa100a3b92f42ce87d2fbd4c02aa5caa
parent3d0df91dc704fbcfa819ba42cccfa6a2f1616ff9 (diff)
downloadphosphor-host-ipmid-88ad815d276ee70e5e09e700ecca5014230a1672.tar.gz
phosphor-host-ipmid-88ad815d276ee70e5e09e700ecca5014230a1672.zip
ipmid: Fix Get BT Interface Capabilities response
Per the IPMI 2.0 spec, the input and output buffer size must be maximum buffer size minus one byte to allocate space for the length byte. Change-Id: Ie1768b9c6844275f7897fbf8056ce2a19b1c11c3 Fixes: openbmc/openbmc#847 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
-rw-r--r--apphandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/apphandler.cpp b/apphandler.cpp
index 431cbf0..28d97c9 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -405,7 +405,9 @@ ipmi_ret_t ipmi_app_get_bt_capabilities(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
// Status code.
ipmi_ret_t rc = IPMI_CC_OK;
- uint8_t str[] = {0x01, MAX_IPMI_BUFFER, MAX_IPMI_BUFFER, 0x0A, 0x01};
+ // Per IPMI 2.0 spec, the input and output buffer size must be the max
+ // buffer size minus one byte to allocate space for the length byte.
+ uint8_t str[] = {0x01, MAX_IPMI_BUFFER-1, MAX_IPMI_BUFFER-1, 0x0A, 0x01};
// Data length
*data_len = sizeof(str);
OpenPOWER on IntegriCloud