]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/normal/menu_entry.c (init_line): Fix off-by-one error.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 23 Mar 2011 13:18:56 +0000 (14:18 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 23 Mar 2011 13:18:56 +0000 (14:18 +0100)
ChangeLog
grub-core/normal/menu_entry.c

index 3330a357bf738659f1e1cadd6d9339238179f0a3..c7bc69f586e3c32e802a705e6edeec0f8007ec7a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index e744d8d693bd4cc5c9484772c9e4d0bee0dade01..94f6e7f32d47f9c55aab9ea3a4e170b624d193c1 100644 (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;