mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-22 07:58:22 +08:00
Fix TotalSize check
This commit is contained in:
parent
3507698136
commit
8bddbe7d1f
@ -1249,8 +1249,8 @@ BOOLEAN FfsParser::microcodeHeaderValid(const INTEL_MICROCODE_HEADER* ucodeHeade
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Check TotalSize to be greater then DataSize snd less than 0x1000000
|
||||
if (ucodeHeader->TotalSize <= ucodeHeader->DataSize ||
|
||||
// Check TotalSize to be greater or equal than DataSize and less than 0x1000000
|
||||
if (ucodeHeader->TotalSize < ucodeHeader->DataSize ||
|
||||
ucodeHeader->TotalSize > 0xFFFFFF) {
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ typedef struct {
|
||||
// This scructure is described in Section 9.11.1 of the Intel Software Developer manual Volume 3A Part 1
|
||||
typedef struct INTEL_MICROCODE_HEADER_ {
|
||||
UINT32 Version; // 0x00000001
|
||||
UINT32 Revision; // Sane values are less than 0x100
|
||||
UINT32 Revision;
|
||||
UINT16 DateYear; // BCD
|
||||
UINT8 DateDay; // BCD
|
||||
UINT8 DateMonth; // BCD
|
||||
|
Loading…
Reference in New Issue
Block a user