[Bug 4320] MdePkg/Library/UefiLib: Coverity scan flags FORWARD_NULL issues


bugzilla-daemon@...
 

https://bugzilla.tianocore.org/show_bug.cgi?id=4320

--- Comment #1 from Veeresh Sangolli <veeresh.sangolli@...> ---
Created attachment 1311
--> https://bugzilla.tianocore.org/attachment.cgi?id=1311&action=edit
Proposed patch to resolve the Forward_Null issue pointed by Coverity for MdePkg

The function ScanTableInSDT at its beginning does a NULL check on
PreviousTableLocated value and has ASSERT (PreviousTable != NULL);
in the if path and ASSERT (PreviousTable == NULL); in the else path.

Both these ASSERT are applicable only in the DEBUG mode and the code
still proceeds further after the if-else blocks and may lead to CRASH.

Hence, for safety add due blocking checks in if as well as else path.

--
You are receiving this mail because:
You are on the CC list for the bug.