mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-24 22:35:28 +00:00
81987f4958
- Try to fix things for new compiler madness. I really don't know why gcc decided __attribute__((packed)) on a "typedef struct" should imply __attribute__((align (1))) and that it should have a warning that it does so. The obvious behavior would be to keep the alignment of the first element unless it's used in another object or type that /also/ hask the packed attribute. Why should it change the default alignment at all? - Merge in the BLS patches Javier and I wrote. - Attempt to fix pmtimer initialization failures to not be super duper slow. Signed-off-by: Peter Jones <pjones@redhat.com>
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
From e8ab5a1a9e2889eb59d1fa494ba441a53698dcd2 Mon Sep 17 00:00:00 2001
|
|
From: Rob Clark <rclark@redhat.com>
|
|
Date: Wed, 19 Jul 2017 15:47:41 -0400
|
|
Subject: [PATCH 050/206] Fix a segfault in lsefi
|
|
|
|
when protocols_per_handle returns error, we can't use the pointers we
|
|
passed to it, and that includes trusting num_protocols.
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
|
---
|
|
grub-core/commands/efi/lsefi.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/grub-core/commands/efi/lsefi.c b/grub-core/commands/efi/lsefi.c
|
|
index d901c389263..d1ce99af438 100644
|
|
--- a/grub-core/commands/efi/lsefi.c
|
|
+++ b/grub-core/commands/efi/lsefi.c
|
|
@@ -109,8 +109,10 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)),
|
|
|
|
status = efi_call_3 (grub_efi_system_table->boot_services->protocols_per_handle,
|
|
handle, &protocols, &num_protocols);
|
|
- if (status != GRUB_EFI_SUCCESS)
|
|
+ if (status != GRUB_EFI_SUCCESS) {
|
|
grub_printf ("Unable to retrieve protocols\n");
|
|
+ continue;
|
|
+ }
|
|
for (j = 0; j < num_protocols; j++)
|
|
{
|
|
for (k = 0; k < ARRAY_SIZE (known_protocols); k++)
|
|
--
|
|
2.15.0
|
|
|