summaryrefslogtreecommitdiffstats
path: root/process.cpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-11-13 12:52:30 -0800
committerPatrick Venture <venture@google.com>2018-11-13 15:24:53 -0800
commitebf7b9b60cb57913ac20b669203cd9192b660b7e (patch)
tree23688ab2d25677f54c884d266436d19745e64598 /process.cpp
parent4125880028cc4a825f710b9e1b09986aacd4e1bb (diff)
downloadphosphor-ipmi-blobs-ebf7b9b60cb57913ac20b669203cd9192b660b7e.tar.gz
phosphor-ipmi-blobs-ebf7b9b60cb57913ac20b669203cd9192b660b7e.zip
bugfix: skip 0'd crc bytes on reply computation
Skip the 0'd CRC bytes on reply computation, mirroring the skipping during request validation. Tested: Verified via client the CRC for the reply now matches expectations. Change-Id: I18da28604a388fb4210c55f3e54410a067b9f10a Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'process.cpp')
-rw-r--r--process.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/process.cpp b/process.cpp
index 7e6410d..683bf77 100644
--- a/process.cpp
+++ b/process.cpp
@@ -136,9 +136,8 @@ ipmi_ret_t processBlobCommand(IpmiBlobHandler cmd, ManagerInterface* mgr,
/* The command, whatever it was, replied, so let's set the CRC. */
crc->clear();
- replyCmdBuf[0] = 0x00;
- replyCmdBuf[1] = 0x00;
- crc->compute(replyCmdBuf, replyLength);
+ crc->compute(replyCmdBuf + sizeof(uint16_t),
+ replyLength - sizeof(uint16_t));
/* Copy the CRC into place. */
uint16_t crcValue = crc->get();
OpenPOWER on IntegriCloud