From 61d4f8f92a62e16190fd0d9e3568aba801a151de Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Fri, 25 Dec 2009 04:28:31 +0000 Subject: 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 --- MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c index aea6af5..f4388a6 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); // -- cgit v1.1