[PATCH v1 1/5] commands: keystore: init s_len

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



if read_file_2 will fail, s_len will stay uninitialized.

Signed-off-by: Oleksij Rempel <linux@xxxxxxxxxxxxxxxx>
---
 commands/keystore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands/keystore.c b/commands/keystore.c
index 52c4be263..50a6c8494 100644
--- a/commands/keystore.c
+++ b/commands/keystore.c
@@ -15,7 +15,7 @@ static int do_keystore(int argc, char *argv[])
 	const char *file = NULL;
 	char *secret_str = NULL;
 	void *secret;
-	int s_len;
+	int s_len = 0;
 
 	while ((opt = getopt(argc, argv, "rs:f:")) > 0) {
 		switch (opt) {
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux