From 2c7a5f91efafea1fa8721a05e79400967b1b5c55 Mon Sep 17 00:00:00 2001 From: Zdenek Styblik Date: Thu, 27 Mar 2014 20:29:44 +0100 Subject: [PATCH] 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. --- src/plugins/open/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/open/open.c b/src/plugins/open/open.c index 0fd8c9e..fe1fd75 100644 --- a/src/plugins/open/open.c +++ b/src/plugins/open/open.c @@ -390,7 +390,7 @@ ipmi_openipmi_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req) /* save response data for caller */ if (rsp.ccode == 0 && rsp.data_len > 0) { 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) {