From a857ea4199ead1858e55b081fea38fcf0e721c8c Mon Sep 17 00:00:00 2001 From: Shenglei Zhang Date: Tue, 15 Oct 2019 10:06:42 +0800 Subject: [PATCH] MdeModulePkg/UhciPei: Initialize the variable RequestMap RequestMap is used but not Initialized. RequestMap is called by UhciMapUserRequest, in which RequestMap(Map) is called by IoMmuMap, and is finally called by IoMmu->Map. We can not assume RequestMap is given an initial value at any step. Cc: Hao A Wu Cc: Ray Ni Signed-off-by: Shenglei Zhang Reviewed-by: Hao A Wu --- MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c index b897c3f82c..a05834da3c 100644 --- a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c +++ b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c @@ -274,6 +274,8 @@ UhcControlTransfer ( PktID = INPUT_PACKET_ID; + RequestMap = NULL; + if (Request == NULL || TransferResult == NULL) { return EFI_INVALID_PARAMETER; } -- 2.39.2