summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Disk/PartitionDxe
diff options
context:
space:
mode:
authorgeekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524>2011-05-27 20:04:45 +0000
committergeekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524>2011-05-27 20:04:45 +0000
commitc582ad454b8f24af3244e5043c2bd8f01e48c881 (patch)
treee7a7bc463d88e0fb249f41fb165be51847eb29da /MdeModulePkg/Universal/Disk/PartitionDxe
parentf44e8c16f84f1f662541c9dfe573cb67535942d5 (diff)
downloadedk2-platforms-c582ad454b8f24af3244e5043c2bd8f01e48c881.tar.xz
MdeModulePkg: Fixed memory corruption when BlockIo2 is not present
Fixed NULL pointer reference of BlockIo2.Media in partition code. This resulted in the interrupt vector table being corrupted in a legacy (CSM) based system. Signed-off-by: geekboy15a Reviewed-by: mdkinney Reviewed-by: niruiyu Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11711 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Disk/PartitionDxe')
-rw-r--r--MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
index dd62171749..ed564e5cf3 100644
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
@@ -1053,13 +1053,13 @@ PartitionInstallChildHandle (
// for logical partitions.
//
if (Private->BlockIo.Revision >= EFI_BLOCK_IO_PROTOCOL_REVISION2) {
- Private->BlockIo.Media->LowestAlignedLba = 0;
- Private->BlockIo.Media->LogicalBlocksPerPhysicalBlock = 0;
- Private->BlockIo2.Media->LowestAlignedLba = 0;
- Private->BlockIo2.Media->LogicalBlocksPerPhysicalBlock = 0;
+ Private->Media.LowestAlignedLba = 0;
+ Private->Media.LogicalBlocksPerPhysicalBlock = 0;
+ Private->Media2.LowestAlignedLba = 0;
+ Private->Media2.LogicalBlocksPerPhysicalBlock = 0;
if (Private->BlockIo.Revision >= EFI_BLOCK_IO_PROTOCOL_REVISION3) {
- Private->BlockIo.Media->OptimalTransferLengthGranularity = 0;
- Private->BlockIo2.Media->OptimalTransferLengthGranularity = 0;
+ Private->Media.OptimalTransferLengthGranularity = 0;
+ Private->Media2.OptimalTransferLengthGranularity = 0;
}
}