summaryrefslogtreecommitdiff
path: root/DynamicTablesPkg
diff options
context:
space:
mode:
authorRanbir Singh <Ranbir.Singh3@Dell.com>2023-08-16 13:38:03 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-09-22 04:56:35 +0000
commit28a267af4024c329e58121ccd9bf5f4f7aabc0f4 (patch)
tree63a946a664cff4fc35faee504337e7930ef148c3 /DynamicTablesPkg
parente9f5d8c0e066da55b3f79dfdbf4df5fc97ca5916 (diff)
downloadedk2-28a267af4024c329e58121ccd9bf5f4f7aabc0f4.zip
edk2-28a267af4024c329e58121ccd9bf5f4f7aabc0f4.tar.gz
edk2-28a267af4024c329e58121ccd9bf5f4f7aabc0f4.tar.bz2
MdeModulePkg/Bus/Pci/UhciDxe: Fix FORWARD_NULL Coverity issues
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>
Diffstat (limited to 'DynamicTablesPkg')
0 files changed, 0 insertions, 0 deletions