]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
Fix the issue when checking the value of KeyDescriptor->Modifier to see if it was...
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbKbDxe / KeyBoard.c
index a11333ccf59ffb38350de7045d09963677809fbf..859a4dece399e01ce5baf877e3d950f12bc29818 100644 (file)
@@ -1562,7 +1562,7 @@ UsbKeyCodeToEfiInputKey (
   //\r
   // Make sure modifier of Key Descriptor is in the valid range according to UEFI spec.\r
   //\r
-  if (KeyDescriptor->Modifier > (sizeof (ModifierValueToEfiScanCodeConvertionTable) / sizeof (UINT8))) {\r
+  if (KeyDescriptor->Modifier >= (sizeof (ModifierValueToEfiScanCodeConvertionTable) / sizeof (UINT8))) {\r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r