From 08806a54c5da1160d15c3a87a0c0b04edecdefcc Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Wed, 25 Nov 2009 03:48:33 +0000 Subject: [PATCH] 2009-11-25 Robert Millan * normal/main.c (grub_normal_read_line): Fix off-by-one buffer overflow.. --- ChangeLog | 5 +++++ normal/main.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 27d538c04..dd26cb18c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-25 Robert Millan + + * normal/main.c (grub_normal_read_line): Fix off-by-one + buffer overflow. + 2009-11-25 Robert Millan * normal/main.c (grub_normal_execute): Replace "parser.sh" with diff --git a/normal/main.c b/normal/main.c index a753ab0c4..dcc91c649 100644 --- a/normal/main.c +++ b/normal/main.c @@ -524,7 +524,7 @@ static grub_err_t grub_normal_read_line (char **line, int cont) { grub_parser_t parser = grub_parser_get_current (); - char prompt[sizeof("> ") - 1 + grub_strlen (parser->name)]; + char prompt[sizeof("> ") + grub_strlen (parser->name)]; grub_sprintf (prompt, "%s> ", parser->name);