diff --git a/ChangeLog b/ChangeLog index 3330a357b..c7bc69f58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-03-23 Vladimir Serbinenko + + * grub-core/normal/menu_entry.c (init_line): Fix off-by-one error. + 2011-03-23 Vladimir Serbinenko * grub-core/script/parser.y: Declare "time" as valid argument. diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c index e744d8d69..94f6e7f32 100644 --- a/grub-core/normal/menu_entry.c +++ b/grub-core/normal/menu_entry.c @@ -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;