[Bug 4292] MdeModulePkg/Universal/DisplayEngineDxe: Coverity scan flags multiple issues



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

The function UiDisplayMenu has ASSERT (MenuOption != NULL); or
ASSERT (HotKey != NULL); checks at various places in the function.

Similary, the function BrowserStatusProcess has a ASSERT check on
ASSERT (OpCodeBuf != NULL && OpCodeBuf->OpCode == EFI_IFR_WARNING_IF_OP);

However these are applicable only in DEBUG mode. In RELEASE mode,
the code continues further to unconditionally dereference MenuOption /
HotKey / OpCodeBuf as the case may be which can lead to CRASH.

To avoid unconditional dereference usage, add due NULL checks for safety.

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