* normal/main.c (grub_normal_add_menu_entry): Avoid going out of args.
Reported by: Seth Goldberg.
This commit is contained in:
parent
5629316656
commit
c2ffc8e956
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-05-31 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* normal/main.c (grub_normal_add_menu_entry): Avoid going out of args.
|
||||
Reported by: Seth Goldberg.
|
||||
|
||||
2010-05-31 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* loader/multiboot_mbi2.c (grub_multiboot_make_mbi): Fix incorrect
|
||||
|
|
|
@ -204,7 +204,7 @@ grub_normal_add_menu_entry (int argc, const char **args,
|
|||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
/* Capture arguments. */
|
||||
if (grub_strncmp ("--", args[i], 2) == 0)
|
||||
if (grub_strncmp ("--", args[i], 2) == 0 && i + 1 < argc)
|
||||
{
|
||||
const char *arg = &args[i][2];
|
||||
|
||||
|
|
Loading…
Reference in a new issue