Fix the issue when checking the value of KeyDescriptor->Modifier to see if it was out of bounds.

Signed-off-by: vanjeff
Reviewed-by: rsun3
Reviewed-by: erictian


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11723 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2011-06-02 06:51:59 +00:00
parent 63b3061628
commit 26fab514ee
1 changed files with 1 additions and 1 deletions

View File

@ -1562,7 +1562,7 @@ UsbKeyCodeToEfiInputKey (
// //
// Make sure modifier of Key Descriptor is in the valid range according to UEFI spec. // Make sure modifier of Key Descriptor is in the valid range according to UEFI spec.
// //
if (KeyDescriptor->Modifier > (sizeof (ModifierValueToEfiScanCodeConvertionTable) / sizeof (UINT8))) { if (KeyDescriptor->Modifier >= (sizeof (ModifierValueToEfiScanCodeConvertionTable) / sizeof (UINT8))) {
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }