* grub/main.c (main): Make sure the boot drive number doesn't

exceed 255.
This commit is contained in:
proski 2006-05-05 21:43:46 +00:00
parent 8e68069b48
commit b8aa16f505
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2006-05-02 Pavel Roskin <proski@gnu.org>
* grub/main.c (main): Make sure the boot drive number doesn't
exceed 255.
2006-05-02 Vesa Jaaskelainen <chaac@nic.fi>
* stage2/shared.h (vbe_mode): Back ported aligment fix from GRUB 2

View file

@ -32,6 +32,7 @@ int grub_stage2 (void);
#define WITHOUT_LIBC_STUBS 1
#include <shared.h>
#include <term.h>
#include <device.h>
char *program_name = 0;
int use_config_file = 1;
@ -192,6 +193,12 @@ main (int argc, char **argv)
perror ("strtoul");
exit (1);
}
if (boot_drive >= NUM_DISKS)
{
fprintf (stderr, "boot_drive should be from 0 to %d\n",
NUM_DISKS - 1);
exit (1);
}
break;
case OPT_NO_CONFIG_FILE: