summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-02-27 17:31:43 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-02-27 17:31:43 -0500
commit1a1db450e54c549382e8466130e63b91ae78b552 (patch)
tree122e61f97ed32036825240b6584d6611c1a77c46 /src
parent6a333238366b3f28124f724ad607a0f00f41a328 (diff)
bootctl: avoid NULL pointer dereference
Diffstat (limited to 'src')
-rw-r--r--src/boot/bootctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index bd55fa95b0..ae467ca35c 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -1329,8 +1329,8 @@ static int bootctl_main(int argc, char*argv[]) {
efi_get_variable_string(EFI_VENDOR_LOADER, "LoaderFirmwareType", &fw_type);
efi_get_variable_string(EFI_VENDOR_LOADER, "LoaderFirmwareInfo", &fw_info);
efi_get_variable_string(EFI_VENDOR_LOADER, "LoaderInfo", &loader);
- efi_get_variable_string(EFI_VENDOR_LOADER, "LoaderImageIdentifier", &loader_path);
- efi_tilt_backslashes(loader_path);
+ if (efi_get_variable_string(EFI_VENDOR_LOADER, "LoaderImageIdentifier", &loader_path) > 0)
+ efi_tilt_backslashes(loader_path);
efi_loader_get_device_part_uuid(&loader_part_uuid);
printf("System:\n");