TGL KW issue 19321

Added check for swpart to avoid accessing out of array elements

Signed-off-by: Perni <ramesh.chandra.perni@intel.com>
This commit is contained in:
Perni
2020-12-15 23:01:41 -07:00
committed by James Gutbub
parent c1aa50eac6
commit e41578e663
@@ -485,7 +485,7 @@ GetLogicalPartitionInfo (
return EFI_INVALID_PARAMETER;
}
if (SwPart >= PartBlockDev->BlockDeviceCount) {
if ((SwPart >= PartBlockDev->BlockDeviceCount) || (SwPart >= PART_MAX_BLOCK_DEVICE)) {
return EFI_INVALID_PARAMETER;
}