diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-02 06:51:59 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-02 06:51:59 +0000 |
commit | 26fab514ee8fc04721d3940c7db6a60df4e8ed1d (patch) | |
tree | 16ff45c4f351cb63f8a3124657bdf0afbfb5dbc4 /MdeModulePkg/Bus | |
parent | 63b306162808b7ed467d67d9997f210430deaf07 (diff) | |
download | edk2-platforms-26fab514ee8fc04721d3940c7db6a60df4e8ed1d.tar.xz |
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
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c index a11333ccf5..859a4dece3 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c @@ -1562,7 +1562,7 @@ UsbKeyCodeToEfiInputKey ( //
// 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;
}
|