* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Fix grub_strncat

argument (access out of bounds).
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-11-10 08:16:27 +01:00
parent 6b68db81fc
commit ad9a2f44b4
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2011-11-10 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Fix grub_strncat
argument (access out of bounds).
2011-11-10 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/btrfs.c (grub_btrfs_read_logical): Fix RAID10 logic for

View file

@ -559,9 +559,9 @@ grub_iso9660_iterate_dir (grub_fshelp_node_t dir,
filename = "..";
else if (entry->len >= 5)
{
int size = 1;
grub_size_t size = 1, csize = 1;
char *old;
size = entry->len - 5;
csize = size = entry->len - 5;
old = filename;
if (filename_alloc)
{
@ -580,7 +580,7 @@ grub_iso9660_iterate_dir (grub_fshelp_node_t dir,
return grub_errno;
}
filename_alloc = 1;
grub_strncat (filename, (char *) &entry->data[1], size);
grub_strncat (filename, (char *) &entry->data[1], csize);
filename[size] = '\0';
}
}