* grub-core/normal/menu_entry.c (init_line): Fix off-by-one error.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-03-23 14:18:56 +01:00
parent bd4d051a95
commit 59e1e5f17b
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2011-03-23 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/normal/menu_entry.c (init_line): Fix off-by-one error.
2011-03-23 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/script/parser.y: Declare "time" as valid argument.

View file

@ -87,7 +87,7 @@ init_line (struct line *linep)
{
linep->len = 0;
linep->max_len = 80; /* XXX */
linep->buf = grub_malloc (linep->max_len);
linep->buf = grub_malloc (linep->max_len + 1);
if (! linep->buf)
return 0;