diff options
| author | Gary Ching-Pang Lin <glin@suse.com> | 2015-06-16 11:41:32 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2015-06-16 11:41:32 -0400 |
| commit | 607d370c2fb0b776be9c860cf3f16be1dcab32a9 (patch) | |
| tree | 8cd4b7fc7837bc84ebe55a203f2a2479090e3638 | |
| parent | c9b0c3520c806b967750037fa8f68dbc5d23f6bb (diff) | |
| download | efi-boot-shim-607d370c2fb0b776be9c860cf3f16be1dcab32a9.tar.gz efi-boot-shim-607d370c2fb0b776be9c860cf3f16be1dcab32a9.zip | |
MokManager: calculate the variable size correctly
MokSize of the hash signature list includes the owner GUID,
so we should not add the 16bytes compensation.
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
| -rw-r--r-- | MokManager.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MokManager.c b/MokManager.c index 6992a7d9..12a91e92 100644 --- a/MokManager.c +++ b/MokManager.c @@ -972,7 +972,9 @@ static EFI_STATUS write_back_mok_list (MokListNode *list, INTN key_num, if (list[i].Mok == NULL) continue; - DataSize += sizeof(EFI_SIGNATURE_LIST) + sizeof(EFI_GUID); + DataSize += sizeof(EFI_SIGNATURE_LIST); + if (CompareGuid(&(list[i].Type), &CertType) == 0) + DataSize += sizeof(EFI_GUID); DataSize += list[i].MokSize; } |
