* grub-core/fs/cpio.c (grub_cpio_find_file): Fix handling of names

occupying the whole field size.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-12-23 13:38:21 +01:00
parent a6120aca2e
commit a54a0e1270
2 changed files with 6 additions and 1 deletions

View File

@ -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.

View 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;
}