mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
bootspec: fix null-dereference-read
Fixes [oss-fuzz#53578](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53578). Fixes #25450.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
719b7d4dc2
commit
46dc071985
@@ -980,6 +980,8 @@ static int boot_config_find(const BootConfig *config, const char *id) {
|
||||
if (id[0] == '@') {
|
||||
if (!strcaseeq(id, "@saved"))
|
||||
return -1;
|
||||
if (!config->entry_selected)
|
||||
return -1;
|
||||
id = config->entry_selected;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"config":"default @saved","loader":[""]}
|
||||
Reference in New Issue
Block a user