* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Don't strrchr
through UTF-16.
This commit is contained in:
parent
0c6c324e90
commit
8ad3f28cec
2 changed files with 16 additions and 12 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-05-17 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Don't strrchr
|
||||
through UTF-16.
|
||||
|
||||
2012-05-17 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/fat.c (grub_fat_find_dir): Fix error message.
|
||||
|
|
|
@ -725,30 +725,29 @@ grub_iso9660_iterate_dir (grub_fshelp_node_t dir,
|
|||
type = GRUB_FSHELP_REG;
|
||||
}
|
||||
|
||||
/* . and .. */
|
||||
if (!filename && dirent.namelen == 1 && (name[0] == ';' || name[0] == 0 || name[0] == 1))
|
||||
{
|
||||
grub_free (node);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* The filename was not stored in a rock ridge entry. Read it
|
||||
from the iso9660 filesystem. */
|
||||
if (!filename)
|
||||
if (!dir->data->joliet && !filename)
|
||||
{
|
||||
name[dirent.namelen] = '\0';
|
||||
filename = grub_strrchr (name, ';');
|
||||
if (filename)
|
||||
*filename = '\0';
|
||||
|
||||
/* . and .. */
|
||||
if (dirent.namelen == 1 && (name[0] == 0 || name[0] == 1))
|
||||
{
|
||||
grub_free (node);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
filename = name;
|
||||
}
|
||||
|
||||
if (dir->data->joliet)
|
||||
if (dir->data->joliet && !filename)
|
||||
{
|
||||
char *oldname, *semicolon;
|
||||
|
||||
oldname = filename;
|
||||
oldname = name;
|
||||
filename = grub_iso9660_convert_string
|
||||
((grub_uint8_t *) oldname, dirent.namelen >> 1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue