mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
FatPkg/FatPei: Check array offset before use
Move the range check before array access to enforce the bounds as expected. Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
parent
7f5e75895b
commit
3ce5f2d445
1 changed files with 1 additions and 1 deletions
|
|
@ -459,7 +459,7 @@ GetRecoveryCapsuleInfo (
|
|||
// Find corresponding physical block device
|
||||
//
|
||||
BlockDeviceNo = PrivateData->Volume[Index].BlockDeviceNo;
|
||||
while (PrivateData->BlockDevice[BlockDeviceNo].Logical && BlockDeviceNo < PrivateData->BlockDeviceCount) {
|
||||
while (BlockDeviceNo < PrivateData->BlockDeviceCount && PrivateData->BlockDevice[BlockDeviceNo].Logical) {
|
||||
BlockDeviceNo = PrivateData->BlockDevice[BlockDeviceNo].ParentDevNo;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue