Skip to content

Commit

Permalink
bootspec: fix null-dereference-read
Browse files Browse the repository at this point in the history
Fixes [oss-fuzz#53578](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53578).
Fixes #25450.

(cherry picked from commit 46dc071)

Resolves: RHEL-36284
  • Loading branch information
yuwata authored and jamacku committed May 15, 2024
1 parent 365a74e commit 41d2e7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/shared/bootspec.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,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;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"config":"default @saved","loader":[""]}

0 comments on commit 41d2e7f

Please sign in to comment.