From f37a90bd0c708de1aa80e66b3f00669691270e3a Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 9 Apr 2018 16:05:58 -0400 Subject: [PATCH] Fix uninitialized values for mirror status. In the case where there's a request for mirroring but it isn't enacted yet, we'll have above4g and below4g uninitialized, and the comparison to rabove4g and rbelow4g will be meaningless. So make them 0. Signed-off-by: Peter Jones --- src/efibootmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/efibootmgr.c b/src/efibootmgr.c index dcd2c92..d52e3a3 100644 --- a/src/efibootmgr.c +++ b/src/efibootmgr.c @@ -1165,8 +1165,8 @@ static void show_mirror(void) { int status; - int below4g, above4g; - int rbelow4g, rabove4g; + int below4g = 0, above4g = 0; + int rbelow4g = 0, rabove4g = 0; if (get_mirror(0, &below4g, &above4g, &status) == 0) { if (status == 0) { -- 2.11.0