mirror of https://github.com/acidanthera/audk.git
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:
parent
63b3061628
commit
26fab514ee
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue