diff --git a/grub2-increase-crypttab-path-buffer.patch b/grub2-increase-crypttab-path-buffer.patch new file mode 100644 index 0000000..9f8349d --- /dev/null +++ b/grub2-increase-crypttab-path-buffer.patch @@ -0,0 +1,26 @@ +From bbf0d5b3bcdde357de343032ecf358764faf0339 Mon Sep 17 00:00:00 2001 +From: Gary Lin +Date: Fri, 16 Dec 2022 09:19:50 +0800 +Subject: [PATCH] commands/crypttab: increase the size of the path buffer + +Allocate a larger buffer for the cryptsetup.d path in case the system +uses a long volume name. + +Signed-off-by: Gary Lin +--- + grub-core/commands/crypttab.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: grub-2.06/grub-core/commands/crypttab.c +=================================================================== +--- grub-2.06.orig/grub-core/commands/crypttab.c ++++ grub-2.06/grub-core/commands/crypttab.c +@@ -11,7 +11,7 @@ static grub_err_t + grub_cmd_crypttab_entry (grub_command_t cmd __attribute__ ((unused)), + int argc, char **argv) + { +- char buf[64]; ++ char buf[256]; + const char *path = NULL; + + if (argc == 2) diff --git a/grub2.changes b/grub2.changes index 96c8b3a..5b384d1 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Dec 16 01:51:45 UTC 2022 - Gary Ching-Pang Lin + +- Increase the path buffer in the crypttab command for the long + volume name (bsc#1206333) + * grub2-increase-crypttab-path-buffer.patch + ------------------------------------------------------------------- Mon Dec 5 08:47:06 UTC 2022 - Michael Chang diff --git a/grub2.spec b/grub2.spec index 49ace87..c863312 100644 --- a/grub2.spec +++ b/grub2.spec @@ -479,6 +479,7 @@ Patch949: 0012-normal-charset-Fix-an-integer-overflow-in-grub_unico.patch Patch950: 0001-fs-btrfs-Use-full-btrfs-bootloader-area.patch Patch951: 0002-Mark-environmet-blocks-as-used-for-image-embedding.patch Patch952: 0001-ieee1275-Increase-initially-allocated-heap-from-1-4-.patch +Patch953: grub2-increase-crypttab-path-buffer.patch Requires: gettext-runtime %if 0%{?suse_version} >= 1140