From: Tom Rini Date: Sat, 26 Aug 2017 17:05:30 -0400 Subject: [U-Boot] [PATCH] mtdparts: Fix uninitialized scalar usage Message-ID: <1503781530-17711-1-git-send-email-trini@konsulko.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de When reworking this code to fix other issues found by Coverity, I forgot to ensure tmp_ep was always cleared before use. Reported-by: Coverity (CID: 166612) Fixes: bc028345acc4 ("mtdparts: Fix final outstanding issue reported by Coverity") Signed-off-by: Tom Rini --- cmd/mtdparts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c index 6e12275b4083..3275eb919bfb 100644 --- a/cmd/mtdparts.c +++ b/cmd/mtdparts.c @@ -1751,6 +1751,7 @@ int mtdparts_init(void) /* save it for later parsing, cannot rely on current partition pointer * as 'partition' variable may be updated during init */ memset(tmp_parts, 0, sizeof(tmp_parts)); + memset(tmp_ep, 0, sizeof(tmp_ep)); if (current_partition) strncpy(tmp_ep, current_partition, PARTITION_MAXLEN); -- 1.9.1