diff options
author | Patrick Venture <venture@google.com> | 2018-12-03 09:01:55 -0800 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-12-03 10:19:47 -0800 |
commit | 50539d364648834e5c0fac6bceef00646b4fde5d (patch) | |
tree | 1d7f97f96120407ff372ea6660b566275e779075 /main.cpp | |
parent | 8aee057be55156d1daec286839029bc1ee511dff (diff) | |
download | phosphor-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.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; } |