summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-12-03 09:01:55 -0800
committerPatrick Venture <venture@google.com>2018-12-03 10:19:47 -0800
commit50539d364648834e5c0fac6bceef00646b4fde5d (patch)
tree1d7f97f96120407ff372ea6660b566275e779075 /main.cpp
parent8aee057be55156d1daec286839029bc1ee511dff (diff)
downloadphosphor-ipmi-blobs-50539d364648834e5c0fac6bceef00646b4fde5d.tar.gz
phosphor-ipmi-blobs-50539d364648834e5c0fac6bceef00646b4fde5d.zip
bugfix: ipmi: set dataLen to zero when appropriate
On failures (or some silent success), set the return buffer length to 0. Change-Id: I118788ffddd2bfc031b3392db4cf13ab04b49287 Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 7bbae28..bc93ddd 100644
--- a/main.cpp
+++ b/main.cpp
@@ -53,6 +53,7 @@ static ipmi_ret_t handleBlobCommand(ipmi_cmd_t cmd, const uint8_t* reqBuf,
validateBlobCommand(&crc, reqBuf, replyCmdBuf, dataLen, &rc);
if (command == nullptr)
{
+ (*dataLen) = 0;
return rc;
}
OpenPOWER on IntegriCloud