diff options
| author | Aaron Pop <aaronpop@microsoft.com> | 2025-10-22 21:33:02 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-08-05 06:07:16 +0300 |
| commit | 699382e3429a4ecd3ccd58d333f413e14bb10edc (patch) | |
| tree | e1f3bfd1070a3c0a37d4099fc3f3ca64cd01f1b9 /MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c | |
| parent | 0f0515f71ba3645823ae17638532099d1e5d5144 (diff) | |
| download | edk2-699382e3429a4ecd3ccd58d333f413e14bb10edc.tar.xz | |
MdeModulePkg: Fix unchecked return status
https://github.com/github/codeql/blob/codeql-cli-2.7.3/csharp/ql/src/API%20Abuse/UncheckedReturnValue.qhelp
When a function has a return status, it should
be checked to verify the function completed successfully.
Failing to check the return status can result in null pointer
dereferences or use of uninitialized variables.
Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
Diffstat (limited to 'MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c')
| -rw-r--r-- | MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c index ef19319614..5bba6ea816 100644 --- a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c +++ b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c @@ -1096,6 +1096,11 @@ BootManagerMenuEntry ( // Initialize Boot menu data
//
Status = InitializeBootMenuData (BootOption, BootOptionCount, &BootMenuData);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "%a Failed InitializeBootMenuData %r\n", __func__, Status));
+ return EFI_NOT_FOUND;
+ }
+
//
// According to boot menu data to draw boot popup menu
//
|
