mtdparts: Fix uninitialized scalar usage
PATCH 1/1 mtdparts: Fix uninitialized scalar usage
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 <[email protected]>
--- cmd/mtdparts.c | 1 + 1 file changed, 1 insertion(+)
cmd/mtdparts.c +1 -0
@@ -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 );
Signature · 1 line
1.9.1
PATCH 1/1 mtdparts: Fix uninitialized scalar usage
Quoted 6 lines · Tom Rini
When reworking this code to fix other issues found by Coverity, I forgot to ensure
tmp_epwas always cleared before use.Reported-by Coverity (CID: 166612)Fixes bc028345acc4 ("mtdparts: Fix final outstanding issue reported by Coverity")Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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>