mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-25 01:18: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
|
// 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;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// All checks passed, BPDT found
|
// All checks passed, BPDT found
|
||||||
nextItemType = Types::BpdtStore;
|
nextItemType = Types::BpdtStore;
|
||||||
|
Loading…
Reference in New Issue
Block a user