mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-21 23:48:22 +08:00
add additional check for BPDT store size
This commit is contained in:
parent
a5675bda90
commit
036be8d3bc
@ -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…
Reference in New Issue
Block a user