MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1206 Newly added XhcSetHsee() routine reads 4 bytes into a UINT16 variable causing issues on PCIE and NonDiscoverable Xhci controllers. Fix that. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Fei1 Wang <fei1.wang@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -609,7 +609,7 @@ XhcSetHsee (
|
|||||||
PciIo,
|
PciIo,
|
||||||
EfiPciIoWidthUint16,
|
EfiPciIoWidthUint16,
|
||||||
PCI_COMMAND_OFFSET,
|
PCI_COMMAND_OFFSET,
|
||||||
sizeof (XhciCmd),
|
sizeof (XhciCmd) / sizeof (UINT16),
|
||||||
&XhciCmd
|
&XhciCmd
|
||||||
);
|
);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
|
Reference in New Issue
Block a user