2008-07-29 Bean <bean123ch@gmail.com>
* normal/main.c (get_line): Fix buffer overflow bug.
This commit is contained in:
parent
41694fd019
commit
e93e4679ce
2 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
2008-07-29 Bean <bean123ch@gmail.com>
|
||||
|
||||
* normal/main.c (get_line): Fix buffer overflow bug.
|
||||
|
||||
2008-07-28 Robert Millan <rmh@aybabtu.com>
|
||||
|
||||
* partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
|
||||
|
|
|
@ -97,9 +97,6 @@ get_line (grub_file_t file)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (c == '\n')
|
||||
break;
|
||||
|
||||
if (pos >= max_len)
|
||||
{
|
||||
char *old_cmdline = cmdline;
|
||||
|
@ -112,6 +109,9 @@ get_line (grub_file_t file)
|
|||
}
|
||||
}
|
||||
|
||||
if (c == '\n')
|
||||
break;
|
||||
|
||||
cmdline[pos++] = c;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue