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

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