mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-23 16:38:23 +08:00
parent
8e710e637a
commit
2b8b00d5b0
@ -1159,12 +1159,6 @@ USTATUS FfsParser::parseVolumeHeader(const UByteArray & volume, const UINT32 loc
|
|||||||
(msgInvalidChecksum ? usprintf(", invalid, should be %04Xh", calculated) : UString(", valid"));
|
(msgInvalidChecksum ? usprintf(", invalid, should be %04Xh", calculated) : UString(", valid"));
|
||||||
|
|
||||||
// Extended header present
|
// Extended header present
|
||||||
|
|
||||||
// volumeHeader->ExtHeaderOffset should be aligned to 4 bytes
|
|
||||||
if (volumeHeader->ExtHeaderOffset % 4) {
|
|
||||||
msg(usprintf("%s: ExtHeaderOffset %04Xh (%hu) is not aligned by 4 bytes", __FUNCTION__, volumeHeader->ExtHeaderOffset, volumeHeader->ExtHeaderOffset));
|
|
||||||
return U_INVALID_VOLUME;
|
|
||||||
}
|
|
||||||
if (volumeHeader->Revision > 1 && volumeHeader->ExtHeaderOffset) {
|
if (volumeHeader->Revision > 1 && volumeHeader->ExtHeaderOffset) {
|
||||||
if ((UINT32)volume.size() < volumeHeader->ExtHeaderOffset + sizeof(EFI_FIRMWARE_VOLUME_EXT_HEADER)) {
|
if ((UINT32)volume.size() < volumeHeader->ExtHeaderOffset + sizeof(EFI_FIRMWARE_VOLUME_EXT_HEADER)) {
|
||||||
return U_INVALID_VOLUME;
|
return U_INVALID_VOLUME;
|
||||||
|
Loading…
Reference in New Issue
Block a user