* normal/main.c (grub_normal_add_menu_entry): Avoid going out of args.

Reported by: Seth Goldberg.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-05-31 20:46:16 +02:00
parent 5629316656
commit c2ffc8e956
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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];