mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
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>
This commit is contained in:
parent
0f0515f71b
commit
699382e342
2 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
//
|
||||
|
|
|
|||
|
|
@ -993,7 +993,7 @@ DumpProvisionedCapsule (
|
|||
//
|
||||
// Display description and device path
|
||||
//
|
||||
GetEfiSysPartitionFromBootOptionFilePath (BootNextOptionEntry.FilePath, &DevicePath, &Fs);
|
||||
Status = GetEfiSysPartitionFromBootOptionFilePath (BootNextOptionEntry.FilePath, &DevicePath, &Fs);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Print (L"Capsules are provisioned on BootOption: %s\n", BootNextOptionEntry.Description);
|
||||
Print (L" %s %s\n", ShellProtocol->GetMapFromDevicePath (&DevicePath), ConvertDevicePathToText (DevicePath, TRUE, TRUE));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue