]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/fs/cpio.c (grub_cpio_find_file): Fix handling of names
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 23 Dec 2011 12:38:21 +0000 (13:38 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 23 Dec 2011 12:38:21 +0000 (13:38 +0100)
occupying the whole field size.

ChangeLog
grub-core/fs/cpio.c

index 979acdf472678a0d8555fc4faf0beb3018139038..de2ec0406ce814c1c07e0a1ff9e29b0c47eda743 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-23  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/fs/cpio.c (grub_cpio_find_file): Fix handling of names
+       occupying the whole field size.
+
 2011-12-23  Lukas Anzinger <l.anzinger@gmail.com>
 
        * util/grub-mkconfig_lib.in (version_test_gt): Fix variable names.
index 63a1d1f4361a11c0d8d051a35f6a51de225eb568..a40d4f0a2690783f567a778d7f1d8ce5580945d7 100644 (file)
@@ -225,7 +225,7 @@ grub_cpio_find_file (struct grub_cpio_data *data, char **name,
 
       if (!have_longname)
        {
-         *name = grub_strdup (hd.name);
+         *name = grub_strndup (hd.name, sizeof (hd.name));
          if (*name == NULL)
            return grub_errno;
        }