diff options
author | geekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-05-27 20:04:45 +0000 |
---|---|---|
committer | geekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-05-27 20:04:45 +0000 |
commit | c582ad454b8f24af3244e5043c2bd8f01e48c881 (patch) | |
tree | e7a7bc463d88e0fb249f41fb165be51847eb29da /MdeModulePkg | |
parent | f44e8c16f84f1f662541c9dfe573cb67535942d5 (diff) | |
download | edk2-c582ad454b8f24af3244e5043c2bd8f01e48c881.tar.gz edk2-c582ad454b8f24af3244e5043c2bd8f01e48c881.tar.bz2 edk2-c582ad454b8f24af3244e5043c2bd8f01e48c881.zip |
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')
-rw-r--r-- | MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c | 12 |
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;
}
}
|