]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/UsbBus: Reject descriptor whose length is bad
authorRuiyu Ni <ruiyu.ni@intel.com>
Thu, 27 Sep 2018 08:36:05 +0000 (16:36 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 17 Oct 2018 03:03:57 +0000 (11:03 +0800)
commit70c3c2370a2aefe71cf0f6c1a1e063f7d74e1d79
treed004f2904f04bcc23b70487aab9f505343baa7b1
parent4c034bf62cbc1f3c5f4b5df25de97f0f528132b2
MdeModulePkg/UsbBus: Reject descriptor whose length is bad

Today's implementation doesn't check whether the length of
descriptor is valid before using it.

The patch fixes this issue.

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>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c