Skip to content

Commit

Permalink
sbat: use correct type for parse_sbat_var() return value
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Martinez Canillas <[email protected]>
  • Loading branch information
martinezjavier committed Feb 16, 2021
1 parent d1eb757 commit 038891b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,8 @@ handle_image (void *data, unsigned int datasize,
}

if (secure_mode ()) {
int res;
unsigned int i;
EFI_STATUS efi_status;
struct sbat sbat = { 0 };
struct sbat_entry *entry = NULL;

Expand All @@ -1057,10 +1057,11 @@ handle_image (void *data, unsigned int datasize,
CopyMem(sbat_data, SBATBase, SBATSize);
sbat_data[SBATSize] = '\0';

res = parse_sbat(sbat_data, sbat_size, &sbat);
if (res < 0) {
console_print(L"SBAT data not correct: %r\n", res);
return EFI_UNSUPPORTED;
efi_status = parse_sbat(sbat_data, sbat_size, &sbat);
if (EFI_ERROR(efi_status)) {
perror(L"SBAT data not correct: %r\n",
efi_status);
return efi_status;
}

dprint(L"SBAT data\n");
Expand Down

0 comments on commit 038891b

Please sign in to comment.