mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
f335832963
commit
61d4f8f92a
|
@ -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);
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue