summaryrefslogtreecommitdiff
path: root/MdePkg/Library/UefiUsbLib
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-03 01:57:56 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-03 01:57:56 +0000
commit134c1f33ed942219fa4bdd5b9525193ebff6360b (patch)
tree232cced7c1e4dd4b231d02366088b5fa9a12931d /MdePkg/Library/UefiUsbLib
parent35c218d7e6d542bb770858719676431b79ca1244 (diff)
downloadedk2-platforms-134c1f33ed942219fa4bdd5b9525193ebff6360b.tar.xz
modify the implementation of GetInterface and GetConfiguration to force the high byte of output type parameters zero.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8447 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/UefiUsbLib')
-rw-r--r--MdePkg/Library/UefiUsbLib/UsbDxeLib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/MdePkg/Library/UefiUsbLib/UsbDxeLib.c b/MdePkg/Library/UefiUsbLib/UsbDxeLib.c
index c27fb03499..521fdd0101 100644
--- a/MdePkg/Library/UefiUsbLib/UsbDxeLib.c
+++ b/MdePkg/Library/UefiUsbLib/UsbDxeLib.c
@@ -177,6 +177,8 @@ UsbGetInterface (
ASSERT (AlternateSetting != NULL);
ASSERT (Status != NULL);
+ *AlternateSetting = 0;
+
ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));
DevReq.RequestType = USB_DEV_GET_INTERFACE_REQ_TYPE;
@@ -283,6 +285,8 @@ UsbGetConfiguration (
ASSERT (ConfigurationValue != NULL);
ASSERT (Status != NULL);
+ *ConfigurationValue = 0;
+
ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));
DevReq.RequestType = USB_DEV_GET_CONFIGURATION_REQ_TYPE;