fix compilation

This commit is contained in:
Dmitry Frolov 2018-08-23 10:35:41 +03:00
parent ec43311867
commit da7eb36ffa
2 changed files with 3 additions and 3 deletions

View File

@ -133,7 +133,7 @@ UINT32 sizeOfSectionHeader(const EFI_COMMON_SECTION_HEADER* header)
case EFI_SECTION_GUID_DEFINED: {
if (!extended) {
const EFI_GUID_DEFINED_SECTION* gdsHeader = (const EFI_GUID_DEFINED_SECTION*)header;
if (QByteArray((const char*)&gdsHeader->SectionDefinitionGuid, sizeof(EFI_GUID)) == EFI_FIRMWARE_CONTENTS_SIGNED_GUID) {
if (UByteArray((const char*)&gdsHeader->SectionDefinitionGuid, sizeof(EFI_GUID)) == EFI_FIRMWARE_CONTENTS_SIGNED_GUID) {
const WIN_CERTIFICATE* certificateHeader = (const WIN_CERTIFICATE*)(gdsHeader + 1);
return gdsHeader->DataOffset + certificateHeader->Length;
}
@ -141,7 +141,7 @@ UINT32 sizeOfSectionHeader(const EFI_COMMON_SECTION_HEADER* header)
}
else {
const EFI_GUID_DEFINED_SECTION2* gdsHeader = (const EFI_GUID_DEFINED_SECTION2*)header;
if (QByteArray((const char*)&gdsHeader->SectionDefinitionGuid, sizeof(EFI_GUID)) == EFI_FIRMWARE_CONTENTS_SIGNED_GUID) {
if (UByteArray((const char*)&gdsHeader->SectionDefinitionGuid, sizeof(EFI_GUID)) == EFI_FIRMWARE_CONTENTS_SIGNED_GUID) {
const WIN_CERTIFICATE* certificateHeader = (const WIN_CERTIFICATE*)(gdsHeader + 1);
return gdsHeader->DataOffset + certificateHeader->Length;
}

View File

@ -755,7 +755,7 @@ out:
}
if (parser->newPeiCoreEntryPoint && parser->peiCoreEntryPoint != parser->newPeiCoreEntryPoint) {
// Replace last occurrence of oldPeiCoreEntryPoint with newPeiCoreEntryPoint
QByteArray old((char*)&parser->peiCoreEntryPoint, sizeof(parser->peiCoreEntryPoint));
UByteArray old((char*)&parser->peiCoreEntryPoint, sizeof(parser->peiCoreEntryPoint));
int i = vtf.lastIndexOf(old);
if (i == -1)
msg("patchVtf: PEI Core entry point can't be found in VTF. VTF not patched.", index);