Skip to content
Snippets Groups Projects
Commit 8b3cec7d authored by Tom Rini's avatar Tom Rini
Browse files

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: bc028345 ("mtdparts: Fix final outstanding issue reported by Coverity")
Signed-off-by: default avatarTom Rini <trini@konsulko.com>
parent bd95e655
Branches
Tags
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment