From 59e1e5f17ba434d6fbf66de4014471f01c1c00e2 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 23 Mar 2011 14:18:56 +0100 Subject: [PATCH] * grub-core/normal/menu_entry.c (init_line): Fix off-by-one error. --- ChangeLog | 4 ++++ grub-core/normal/menu_entry.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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;