From 8932e407563e6ae2a87af469d2a336c3b69f3343 Mon Sep 17 00:00:00 2001 From: okuji Date: Tue, 21 Mar 2006 20:51:58 +0000 Subject: [PATCH] 2006-03-21 Yoshinori K. Okuji * stage2/builtins.c (setup_func): Specify the size of DEVICE to grub_strncat instead of a strange number 256. Reported by Vitaly Fertman . --- ChangeLog | 6 ++++++ THANKS | 1 + stage2/builtins.c | 6 +++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0beaa35ad..3fd2dad25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-03-21 Yoshinori K. Okuji + + * stage2/builtins.c (setup_func): Specify the size of DEVICE to + grub_strncat instead of a strange number 256. Reported by Vitaly + Fertman . + 2005-09-29 Yoshinori K. Okuji * docs/multiboot.texi: Fix a bug in the byte order of diff --git a/THANKS b/THANKS index 853da1a5e..03d34d411 100644 --- a/THANKS +++ b/THANKS @@ -121,3 +121,4 @@ Vesa Jaaskelainen Yedidyah Bar-David Yury V. Umanets Yuri Zaporogets +Vitaly Fertman diff --git a/stage2/builtins.c b/stage2/builtins.c index 3e08a8632..0d92bec28 100644 --- a/stage2/builtins.c +++ b/stage2/builtins.c @@ -3830,15 +3830,15 @@ setup_func (char *arg, int flags) { char tmp[16]; grub_sprintf (tmp, ",%d", (partition >> 16) & 0xFF); - grub_strncat (device, tmp, 256); + grub_strncat (device, tmp, sizeof (device)); } if ((partition & 0x00FF00) != 0x00FF00) { char tmp[16]; grub_sprintf (tmp, ",%c", 'a' + ((partition >> 8) & 0xFF)); - grub_strncat (device, tmp, 256); + grub_strncat (device, tmp, sizeof (device)); } - grub_strncat (device, ")", 256); + grub_strncat (device, ")", sizeof (device)); } int embed_stage1_5 (char *stage1_5, int drive, int partition)