audk/MdeModulePkg/Bus/Usb/UsbMouseDxe
Ruiyu Ni 6c46cbbd5e MdeModulePkg/UsbMouse: Don't access key codes when length is wrong
Per USB HID spec, the buffer holding key codes should at least 3-byte
long.
Today's code assumes that the key codes buffer length is longer than
3-byte 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 3-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:03 +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
MouseHid.c MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
UsbMouse.c MdeModulePkg/UsbMouse: Don't access key codes when length is wrong 2018-10-17 11:04:03 +08:00
UsbMouse.h MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
UsbMouseDxe.inf MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
UsbMouseDxe.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
UsbMouseDxeExtra.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00