mirror of https://github.com/acidanthera/audk.git
28a267af40
The function UsbHcGetPciAddressForHostMem has ASSERT ((Block != NULL)); and and the function UsbHcFreeMem has ASSERT (Block != NULL); statement after for loop, but these are applicable only in DEBUG mode. In RELEASE mode, if for whatever reasons there is no match inside for loop and the loop exits because of Block != NULL; condition, then there is no "Block" NULL pointer check afterwards and the code proceeds to do dereferencing "Block" which will lead to CRASH. Hence, for safety add NULL pointer checks always. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4211 Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Co-authored-by: Veeresh Sangolli <veeresh.sangolli@dellteam.com> Signed-off-by: Ranbir Singh <Ranbir.Singh3@Dell.com> Signed-off-by: Ranbir Singh <rsingh@ventanamicro.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> |
||
---|---|---|
.. | ||
ComponentName.c | ||
ComponentName.h | ||
Uhci.c | ||
Uhci.h | ||
UhciDebug.c | ||
UhciDebug.h | ||
UhciDxe.inf | ||
UhciDxe.uni | ||
UhciDxeExtra.uni | ||
UhciQueue.c | ||
UhciQueue.h | ||
UhciReg.c | ||
UhciReg.h | ||
UhciSched.c | ||
UhciSched.h | ||
UsbHcMem.c | ||
UsbHcMem.h |