mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-09 13:52:01 -04:00
add additional check for BPDT store size
This commit is contained in:
parent
a5675bda90
commit
036be8d3bc
1 changed files with 3 additions and 1 deletions
|
@ -1403,8 +1403,10 @@ continue_searching: {}
|
|||
}
|
||||
|
||||
// Check size candidate
|
||||
if (sizeCandidate == 0)
|
||||
if (sizeCandidate == 0 || sizeCandidate > restSize) {
|
||||
msg(usprintf("%s: invalid BpdtStore size (sizeCandidate = 0x%x, restSize = 0x%x)", __FUNCTION__, sizeCandidate, restSize), index);
|
||||
continue;
|
||||
}
|
||||
|
||||
// All checks passed, BPDT found
|
||||
nextItemType = Types::BpdtStore;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue