ID: 299 - openipmi plugin writes zero to wrong byte

The intent is to zero the byte that no longer contains valid data (because the
data was shifted one byte to the left). However, the wrong byte is being zeroed.
One way this shows up is when displaying the descriptions with hpm compprop.
This commit is contained in:
Zdenek Styblik 2014-03-27 20:29:44 +01:00
parent 9e3dba7e97
commit 2c7a5f91ef

View File

@ -390,7 +390,7 @@ ipmi_openipmi_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
/* save response data for caller */ /* save response data for caller */
if (rsp.ccode == 0 && rsp.data_len > 0) { if (rsp.ccode == 0 && rsp.data_len > 0) {
memmove(rsp.data, rsp.data + 1, rsp.data_len); memmove(rsp.data, rsp.data + 1, rsp.data_len);
rsp.data[recv.msg.data_len] = 0; rsp.data[rsp.data_len] = 0;
} }
if (data != NULL) { if (data != NULL) {