Blame SOURCES/0005-efivar-Fix-some-types-in-L-behavior-to-pacify-coveri.patch

821f82
From 4becb1303fee8bd7b377292c74589d6ec69009ae Mon Sep 17 00:00:00 2001
821f82
From: Peter Jones <pjones@redhat.com>
821f82
Date: Tue, 12 Jun 2018 14:36:20 -0400
821f82
Subject: [PATCH 05/17] efivar: Fix some types in -L behavior to pacify
821f82
 coverity.
821f82
821f82
Coverity doesn't realize that efi_well_known_guids is /actually/ an
821f82
array, because we didn't tell it so.  So fix the declaration so we've
821f82
told it so.
821f82
821f82
Signed-off-by: Peter Jones <pjones@redhat.com>
821f82
---
821f82
 src/efivar.c | 4 ++--
821f82
 1 file changed, 2 insertions(+), 2 deletions(-)
821f82
821f82
diff --git a/src/efivar.c b/src/efivar.c
821f82
index 9ee3b397e29..228bdb745a7 100644
821f82
--- a/src/efivar.c
821f82
+++ b/src/efivar.c
821f82
@@ -485,13 +485,13 @@ int main(int argc, char *argv[])
821f82
 		case ACTION_LIST_GUIDS: {
821f82
 			efi_guid_t sentinal = {0xffffffff,0xffff,0xffff,0xffff,
821f82
 					       {0xff,0xff,0xff,0xff,0xff,0xff}};
821f82
-			extern struct guidname efi_well_known_guids;
821f82
+			extern struct guidname efi_well_known_guids[];
821f82
 			extern struct guidname efi_well_known_guids_end;
821f82
 			intptr_t start = (intptr_t)&efi_well_known_guids;
821f82
 			intptr_t end = (intptr_t)&efi_well_known_guids_end;
821f82
 			unsigned int i;
821f82
 
821f82
-			struct guidname *guid = &efi_well_known_guids;
821f82
+			struct guidname *guid = &efi_well_known_guids[0];
821f82
 			for (i = 0; i < (end-start) / sizeof(*guid); i++) {
821f82
 				if (!efi_guid_cmp(&sentinal, &guid[i].guid))
821f82
 					break;
821f82
-- 
821f82
2.17.1
821f82