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

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