summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-25 04:28:31 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-25 04:28:31 +0000
commit61d4f8f92a62e16190fd0d9e3568aba801a151de (patch)
treeab3658086d4a1ad06979845449cf49d78469e4fb /MdeModulePkg/Bus
parentf3358329632b66421cf62e9d3f2b95e411da88f1 (diff)
downloadedk2-platforms-61d4f8f92a62e16190fd0d9e3568aba801a151de.tar.xz
Add assertion to ensure the boolean value must be 0 or 1 before the use of array index
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9602 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r--MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
index aea6af5227..f4388a6c44 100644
--- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
+++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
@@ -409,8 +409,9 @@ TransferAtaDevice (
EFI_ATA_PASS_THRU_COMMAND_PACKET *Packet;
//
- // Ensure AtaDevice->Lba48Bit and IsWrite are valid boolean values
+ // Ensure AtaDevice->UdmaValid, AtaDevice->Lba48Bit and IsWrite are valid boolean values
//
+ ASSERT ((UINTN) AtaDevice->UdmaValid < 2);
ASSERT ((UINTN) AtaDevice->Lba48Bit < 2);
ASSERT ((UINTN) IsWrite < 2);
//