Fix TotalSize check

This commit is contained in:
Nikolaj Schlej 2019-09-05 12:58:51 -07:00
parent 3507698136
commit 8bddbe7d1f
2 changed files with 3 additions and 3 deletions

View file

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