summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/InfSectionParser.py
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2018-09-13 16:09:10 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2018-10-17 11:04:03 +0800
commit6c46cbbd5e3e2db7f14c007482e062b90c73c70f (patch)
tree194fe8d024fa4fe02112613b6cda8e1e7a783993 /BaseTools/Source/Python/AutoGen/InfSectionParser.py
parent0dd6065520742f62678db9dd6728f22b2abd68e2 (diff)
downloadedk2-6c46cbbd5e3e2db7f14c007482e062b90c73c70f.tar.gz
edk2-6c46cbbd5e3e2db7f14c007482e062b90c73c70f.tar.bz2
edk2-6c46cbbd5e3e2db7f14c007482e062b90c73c70f.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/InfSectionParser.py')
0 files changed, 0 insertions, 0 deletions