Fix undefined behavior and NULL pointer in boot loader OS list renderer

This commit is contained in:
2024-04-27 00:42:25 +02:00
parent 22693a48d3
commit e80927c5d3
4 changed files with 34 additions and 9 deletions

View File

@@ -32,7 +32,12 @@ BlDisplayBootMenu()
PWCHAR TimeOutString;
/* Initialize boot menu list */
BlInitializeBootMenuList(MenuEntries, &NumberOfEntries, &HighligtedEntryId);
Status = BlInitializeBootMenuList(&MenuEntries, &NumberOfEntries, &HighligtedEntryId);
if(Status != STATUS_EFI_SUCCESS)
{
/* Failed to initialize boot menu list, exit into XTLDR shell */
return;
}
/* Get timeout from the configuration */
TimeOutString = BlGetConfigValue(L"TIMEOUT");