U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mtdparts: Fix uninitialized scalar usage
@ 2017-08-26 21:05 Tom Rini
  2017-08-26 21:20 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rini @ 2017-08-26 21:05 UTC (permalink / raw)
  To: u-boot

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 <trini@konsulko.com>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] mtdparts: Fix uninitialized scalar usage
  2017-08-26 21:05 [U-Boot] [PATCH] mtdparts: Fix uninitialized scalar usage Tom Rini
@ 2017-08-26 21:20 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2017-08-26 21:20 UTC (permalink / raw)
  To: u-boot

On Sat, Aug 26, 2017 at 05:05:30PM -0400, Tom Rini wrote:

> 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 <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170826/5c6b6091/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-26 21:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-26 21:05 [U-Boot] [PATCH] mtdparts: Fix uninitialized scalar usage Tom Rini
2017-08-26 21:20 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox