[Skiboot] [PATCH] external/opal-prd: Set initial size value

Jeremy Kerr jk at ozlabs.org
Fri Dec 11 04:04:58 AEDT 2015


We're not initialising 'size' in handle_prd_control_run_cmd.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---
 external/opal-prd/opal-prd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c
index 115443c..a82000a 100644
--- a/external/opal-prd/opal-prd.c
+++ b/external/opal-prd/opal-prd.c
@@ -1317,6 +1317,7 @@ static void handle_prd_control_run_cmd(struct control_msg *send_msg,
 	}
 
 	s = (char *)recv_msg->data;
+	size = 0;
 	for (i = 0; i < argc; i++) {
 		argv[i] = (char *)htobe64((uint64_t)&s[size]);
 		size += (strlen(&s[size]) + 1);
-- 
2.5.0



More information about the Skiboot mailing list