Commit 0b0635f1 authored by Michael Ott's avatar Michael Ott
Browse files

Check not only for msb being beyond the length of the IPMI response but also lsb

parent 6815b1f6
......@@ -190,10 +190,14 @@ int64_t IPMIHost::sendRawCmd(const std::vector<uint8_t>& rawCmd, uint8_t lsb, ui
throw std::runtime_error(_errorMsg);
return 0;
}
std::stringstream ss;
if (msb > len) {
std::stringstream ss;
ss << "Error processing IPMI raw data: stop=" << msb << " > len=" << len;
ss << "Error processing IPMI raw data: msb=" << msb << " > len=" << len;
} else if (lsb > len) {
ss << "Error processing IPMI raw data: lsb=" << lsb << " > len=" << len;
}
if (ss.gcount() > 0) {
throw std::runtime_error(ss.str());
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment