From d7a565e962b541b8a5ccb2719253a884b2c2b422 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 8 Apr 2011 14:37:13 +0200 Subject: [PATCH] * grub-core/normal/menu_entry.c (run): Use grub_memcpy rather than grub_strcpy since the lines aren't necessarily 0-terminated. --- ChangeLog | 5 +++++ grub-core/normal/menu_entry.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 70101ef17..7621dc3fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-04-08 Vladimir Serbinenko + + * 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 * grub-core/lib/legacy_parse.c (legacy_commands): Find doesn't set diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c index a675ff005..30af2c1dc 100644 --- a/grub-core/normal/menu_entry.c +++ b/grub-core/normal/menu_entry.c @@ -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'; }