Skip to content

Commit

Permalink
vmspawn: fix possible NULL dereference in discover_boot_entry
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-leonard-ct authored and ayhamthemayhem committed Mar 25, 2024
1 parent e29e4a8 commit 348b298
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vmspawn/vmspawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ static int discover_boot_entry(const char *root, char **ret_linux, char ***ret_i

const BootEntry *boot_entry = boot_config_default_entry(&config);

if (!IN_SET(boot_entry->type, BOOT_ENTRY_UNIFIED, BOOT_ENTRY_CONF))
if (boot_entry && !IN_SET(boot_entry->type, BOOT_ENTRY_UNIFIED, BOOT_ENTRY_CONF))
boot_entry = NULL;

/* If we cannot determine a default entry search for UKIs (Type #2 EFI Unified Kernel Images)
Expand Down

0 comments on commit 348b298

Please sign in to comment.