sd-boot: Fix possible null pointer dereference
Auto entries are showing garbage for the version in print_status() because StrDuplicate does not expect null pointers.
This commit is contained in:
+1
-1
@@ -1722,7 +1722,7 @@ static ConfigEntry *config_entry_add_loader(
|
||||
*entry = (ConfigEntry) {
|
||||
.type = type,
|
||||
.title = StrDuplicate(title),
|
||||
.version = StrDuplicate(version),
|
||||
.version = version ? StrDuplicate(version) : NULL,
|
||||
.device = device,
|
||||
.loader = StrDuplicate(loader),
|
||||
.id = StrDuplicate(id),
|
||||
|
||||
Reference in New Issue
Block a user