summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_image_loader.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-05-08 14:56:23 -0400
committerTom Rini <trini@konsulko.com>2020-05-08 14:56:23 -0400
commita5e609b982a004e009e8ee0aa6066785db425ac2 (patch)
tree3e687989c84d8a2f4bb9b4f06bb4b4bfe558d98a /lib/efi_loader/efi_image_loader.c
parentea02cfb6495eb5f54bf239405316746a19d303b2 (diff)
parentd7ca3ce3d3b990503cb6e0bafad91aa2a7c96b9d (diff)
Merge tag 'efi-2020-07-rc2-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-07-rc2-3 This series contains bug fixes and code simplifications. Following clarification in the discussion of the EBBR specification device trees will be passed as EfiACPIReclaimMemory to UEFI applications.
Diffstat (limited to 'lib/efi_loader/efi_image_loader.c')
-rw-r--r--lib/efi_loader/efi_image_loader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c
index 5a9a6424cc1..4e075ae416e 100644
--- a/lib/efi_loader/efi_image_loader.c
+++ b/lib/efi_loader/efi_image_loader.c
@@ -13,7 +13,8 @@
#include <malloc.h>
#include <pe.h>
#include <sort.h>
-#include "crypto/pkcs7_parser.h"
+#include <crypto/pkcs7_parser.h>
+#include <linux/err.h>
const efi_guid_t efi_global_variable_guid = EFI_GLOBAL_VARIABLE_GUID;
const efi_guid_t efi_guid_device_path = EFI_DEVICE_PATH_PROTOCOL_GUID;
@@ -538,8 +539,9 @@ static bool efi_image_authenticate(void *efi, size_t efi_size)
}
msg = pkcs7_parse_message((void *)wincert + sizeof(*wincert),
wincert->dwLength - sizeof(*wincert));
- if (!msg) {
+ if (IS_ERR(msg)) {
debug("Parsing image's signature failed\n");
+ msg = NULL;
goto err;
}