audk/MdeModulePkg/Bus/Usb/UsbKbDxe
Ruiyu Ni 8bcbe587e7 MdeModulePkg/UsbKb: Don't access key codes when length is wrong
Per USB HID spec, the buffer holding key codes should be 8-byte
long.
Today's code assumes that the key codes buffer length is 8-byte
long and unconditionally accesses the key codes buffer.
It's incorrect.
The patch fixes the issue by returning Device Error when the
length is less than 8-byte.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2018-10-17 11:04:01 +08:00
..
ComponentName.c Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is valid/invalid. 2011-07-06 03:55:36 +00:00
EfiKey.c MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
EfiKey.h MdeModulePkg: Update comments in SimpleTextInEx according to UEFI 2.7 2017-06-20 09:29:42 +08:00
KeyBoard.c MdeModulePkg/UsbKb: Don't access key codes when length is wrong 2018-10-17 11:04:01 +08:00
KeyBoard.h MdeModulePkg/UsbKb: ReadKeyStrokeEx always return key state 2018-02-01 14:03:58 +08:00
UsbKbDxe.inf MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
UsbKbDxe.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
UsbKbDxeExtra.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00