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

This commit is contained in:
Christer Weinigel 2012-05-31 14:34:12 +02:00 committed by Vladimir 'phcoder' Serbinenko
parent 05b0bb9100
commit 684aef11c5
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2012-05-31 Christer Weinigel <christer@weinigel.se>
* grub-core/normal/main.c (grub_file_getline): Fix off-by-one error.
2012-05-31 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/loader/i386/linux.c (grub_linux_boot): Use right version.

View file

@ -65,7 +65,7 @@ grub_file_getline (grub_file_t file)
continue;
if (pos >= max_len)
if (pos + 1 >= max_len)
{
char *old_cmdline = cmdline;
max_len = max_len * 2;