]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/normal/menu_entry.c (run): Use grub_memcpy rather than
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 8 Apr 2011 12:37:13 +0000 (14:37 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 8 Apr 2011 12:37:13 +0000 (14:37 +0200)
grub_strcpy since the lines aren't necessarily 0-terminated.

ChangeLog
grub-core/normal/menu_entry.c

index 70101ef17809f3ef3ac43716a5f258ba84330e4c..7621dc3fb8dece8c58bc6bc5aefb8fcdc20c2196 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index a675ff005a59bc7d6fd69dd8917c0a631b1e348e..30af2c1dca0330c458a201f62decd32251e43f03 100644 (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';
       }