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)