diff options
author | Marcin Wojtas <mw@semihalf.com> | 2018-09-26 05:57:51 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2018-09-26 08:33:52 +0800 |
commit | e5cd809087e5710e019d2766fab13c59a2e2ac28 (patch) | |
tree | d3479c6aa2c0d6074f2fec319c4a76bfa48da8c5 /MdeModulePkg/Bus/Pci | |
parent | 3cb0a311cb7e747d7be5c5076d0fff76ad256d2b (diff) | |
download | edk2-e5cd809087e5710e019d2766fab13c59a2e2ac28.tar.gz edk2-e5cd809087e5710e019d2766fab13c59a2e2ac28.tar.bz2 edk2-e5cd809087e5710e019d2766fab13c59a2e2ac28.zip |
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>
Diffstat (limited to 'MdeModulePkg/Bus/Pci')
-rw-r--r-- | MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c index 89f073e1d8..3ed1a55f98 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c @@ -609,7 +609,7 @@ XhcSetHsee ( PciIo,
EfiPciIoWidthUint16,
PCI_COMMAND_OFFSET,
- sizeof (XhciCmd),
+ sizeof (XhciCmd) / sizeof (UINT16),
&XhciCmd
);
if (!EFI_ERROR (Status)) {
|