[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Uninitialized variable leads to spurious 'grub-install' errors
From: |
Ludovic Courtès |
Subject: |
Uninitialized variable leads to spurious 'grub-install' errors |
Date: |
Thu, 18 Oct 2018 00:34:49 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hello!
Commit 6400613ad0b463abc93362086a491cd2a5e99b0d introduced an
uninitialized variable that could lead ‘grub-install’ to error out when
it shouldn’t (I’ve experienced it on AArch64 where
‘grub_install_remove_efi_entries_by_distributor’ didn't have any entry
to remove):
grub-install: error: efibootmgr failed to register the boot entry: Unknown
error 65535.
The patch below solves this.
Thanks,
Ludo’.
--- grub-2.02/grub-core/osdep/unix/platform.c 2018-10-17 22:21:53.015284846
+0200
+++ grub-2.02/grub-core/osdep/unix/platform.c 2018-10-17 22:21:55.595271222
+0200
@@ -85,7 +85,7 @@ grub_install_remove_efi_entries_by_distr
pid_t pid = grub_util_exec_pipe ((const char * []){ "efibootmgr", NULL },
&fd);
char *line = NULL;
size_t len = 0;
- int rc;
+ int rc = 0;
if (!pid)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Uninitialized variable leads to spurious 'grub-install' errors,
Ludovic Courtès <=