projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8ad599
)
sd-boot: don't dereference NULL ptr if loaded_image_path is NULL
author
Lennart Poettering
<lennart@poettering.net>
Fri, 8 Feb 2019 12:03:26 +0000
(13:03 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 1 Mar 2019 11:41:32 +0000
(12:41 +0100)
In a follow-up commit we'd like to invoke config_entry_add_from_file()
on partitions that are not the ESP, let's prepare fpr that and allow
loaded_image_path to be passed as NULL.
src/boot/efi/boot.c
patch
|
blob
|
history
diff --git
a/src/boot/efi/boot.c
b/src/boot/efi/boot.c
index
909e4b0
..
35c649f
100644
(file)
--- a/
src/boot/efi/boot.c
+++ b/
src/boot/efi/boot.c
@@
-1316,7
+1316,7
@@
static VOID config_entry_add_from_file(
entry->loader = stra_to_path(value);
/* do not add an entry for ourselves */
- if (StriCmp(entry->loader, loaded_image_path) == 0) {
+ if (
loaded_image_path &&
StriCmp(entry->loader, loaded_image_path) == 0) {
entry->type = LOADER_UNDEFINED;
break;
}