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>
This commit is contained in:
Gary Ching-Pang Lin 2015-06-16 11:41:32 -04:00 committed by Peter Jones
parent c9b0c3520c
commit 607d370c2f

View File

@ -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;
}