mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 06:25:37 +03:00
Do not require a valid version when parsing sd-boot loader entries
This fixes #20820
This commit is contained in:
parent
a17ebc687b
commit
87c7779599
@ -46,7 +46,7 @@ sd_bool bootspec_pick_name_version_sort_key(
|
||||
good_version = os_image_version ?: (os_version ?: (os_version_id ? : os_build_id));
|
||||
good_sort_key = os_image_id ?: os_id;
|
||||
|
||||
if (!good_name || !good_version)
|
||||
if (!good_name)
|
||||
return sd_false;
|
||||
|
||||
if (ret_name)
|
||||
|
@ -530,9 +530,11 @@ static int boot_entry_load_unified(
|
||||
if (!tmp.sort_key)
|
||||
return log_oom();
|
||||
|
||||
tmp.version = strdup(good_version);
|
||||
if (!tmp.version)
|
||||
return log_oom();
|
||||
if (good_version) {
|
||||
tmp.version = strdup(good_version);
|
||||
if (!tmp.version)
|
||||
return log_oom();
|
||||
}
|
||||
|
||||
*ret = tmp;
|
||||
tmp = (BootEntry) {};
|
||||
|
Loading…
Reference in New Issue
Block a user