* grub-core/commands/menuentry.c (grub_normal_add_menu_entry): Add
zero terminator. Fixes a crash.
This commit is contained in:
parent
2282da4a93
commit
d83ff9f955
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-03-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/commands/menuentry.c (grub_normal_add_menu_entry): Add
|
||||
zero terminator. Fixes a crash.
|
||||
|
||||
2012-03-11 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/loader/i386/linux.c (allocate_pages): Don't allocate
|
||||
|
|
|
@ -99,7 +99,8 @@ grub_normal_add_menu_entry (int argc, const char **args,
|
|||
{
|
||||
int i;
|
||||
for (i = 0; classes[i]; i++); /* count # of menuentry classes */
|
||||
menu_classes = grub_zalloc (sizeof (struct grub_menu_entry_class) * i);
|
||||
menu_classes = grub_zalloc (sizeof (struct grub_menu_entry_class)
|
||||
* (i + 1));
|
||||
if (! menu_classes)
|
||||
goto fail;
|
||||
|
||||
|
|
Loading…
Reference in a new issue