* grub-core/normal/menu_entry.c (run): Use grub_memcpy rather than

grub_strcpy since the lines aren't necessarily 0-terminated.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-04-08 14:37:13 +02:00
parent 7c2e4909c3
commit d7a565e962
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2011-04-08 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/normal/menu_entry.c (run): Use grub_memcpy rather than
grub_strcpy since the lines aren't necessarily 0-terminated.
2011-04-08 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/legacy_parse.c (legacy_commands): Find doesn't set

View file

@ -1185,7 +1185,7 @@ run (struct screen *screen)
size = 0;
for (i = 0; i < screen->num_lines; i++)
{
grub_strcpy (source + size, screen->lines[i].buf);
grub_memcpy (source + size, screen->lines[i].buf, screen->lines[i].len);
size += screen->lines[i].len;
source[size++] = '\n';
}