From: Vladimir 'phcoder' Serbinenko Date: Fri, 8 Apr 2011 12:37:13 +0000 (+0200) Subject: * grub-core/normal/menu_entry.c (run): Use grub_memcpy rather than X-Git-Tag: 1.99~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7a565e962b541b8a5ccb2719253a884b2c2b422;p=thirdparty%2Fgrub.git * grub-core/normal/menu_entry.c (run): Use grub_memcpy rather than grub_strcpy since the lines aren't necessarily 0-terminated. --- 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'; }