2006-03-21 Yoshinori K. Okuji <okuji@enbug.org>

* stage2/builtins.c (setup_func): Specify the size of DEVICE to
        grub_strncat instead of a strange number 256. Reported by Vitaly
        Fertman <vitaly@namesys.com>.
This commit is contained in:
okuji 2006-03-21 20:51:58 +00:00
parent 6d8ace6ee5
commit 8932e40756
3 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2006-03-21 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c (setup_func): Specify the size of DEVICE to
grub_strncat instead of a strange number 256. Reported by Vitaly
Fertman <vitaly@namesys.com>.
2005-09-29 Yoshinori K. Okuji <okuji@enbug.org> 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
* docs/multiboot.texi: Fix a bug in the byte order of * docs/multiboot.texi: Fix a bug in the byte order of

1
THANKS
View file

@ -121,3 +121,4 @@ Vesa Jaaskelainen <jaaskela@tietomyrsky.fi>
Yedidyah Bar-David <didi@post.tau.ac.il> Yedidyah Bar-David <didi@post.tau.ac.il>
Yury V. Umanets <umka@namesys.com> Yury V. Umanets <umka@namesys.com>
Yuri Zaporogets <yuriz@ukr.net> Yuri Zaporogets <yuriz@ukr.net>
Vitaly Fertman <vitaly@namesys.com>

View file

@ -3830,15 +3830,15 @@ setup_func (char *arg, int flags)
{ {
char tmp[16]; char tmp[16];
grub_sprintf (tmp, ",%d", (partition >> 16) & 0xFF); grub_sprintf (tmp, ",%d", (partition >> 16) & 0xFF);
grub_strncat (device, tmp, 256); grub_strncat (device, tmp, sizeof (device));
} }
if ((partition & 0x00FF00) != 0x00FF00) if ((partition & 0x00FF00) != 0x00FF00)
{ {
char tmp[16]; char tmp[16];
grub_sprintf (tmp, ",%c", 'a' + ((partition >> 8) & 0xFF)); 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) int embed_stage1_5 (char *stage1_5, int drive, int partition)