Properly handle deleted files on UDF.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Skip directory entries whose "characteristics" field has the bit GRUB_UDF_FID_CHAR_DELETED set.
This commit is contained in:
parent
406858a8a9
commit
cb0229c587
2 changed files with 55 additions and 44 deletions
|
@ -1,3 +1,11 @@
|
|||
2010-11-14 Giuseppe Caizzone <acaizzo@gmail.com>
|
||||
|
||||
Properly handle deleted files on UDF.
|
||||
|
||||
* grub-core/fs/udf.c (grub_udf_iterate_dir): Skip directory entries
|
||||
whose "characteristics" field has the bit GRUB_UDF_FID_CHAR_DELETED
|
||||
set.
|
||||
|
||||
2010-11-14 Giuseppe Caizzone <acaizzo@gmail.com>
|
||||
|
||||
Support reading files larger than 2 GiB.
|
||||
|
|
|
@ -729,6 +729,9 @@ grub_udf_iterate_dir (grub_fshelp_node_t dir,
|
|||
return 0;
|
||||
}
|
||||
|
||||
offset += sizeof (dirent) + U16 (dirent.imp_use_length);
|
||||
if (!(dirent.characteristics & GRUB_UDF_FID_CHAR_DELETED))
|
||||
{
|
||||
child = grub_malloc (sizeof (struct grub_fshelp_node));
|
||||
if (!child)
|
||||
return 0;
|
||||
|
@ -736,7 +739,6 @@ grub_udf_iterate_dir (grub_fshelp_node_t dir,
|
|||
if (grub_udf_read_icb (dir->data, &dirent.icb, child))
|
||||
return 0;
|
||||
|
||||
offset += sizeof (dirent) + U16 (dirent.imp_use_length);
|
||||
if (dirent.characteristics & GRUB_UDF_FID_CHAR_PARENT)
|
||||
{
|
||||
/* This is the parent directory. */
|
||||
|
@ -782,6 +784,7 @@ grub_udf_iterate_dir (grub_fshelp_node_t dir,
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Align to dword boundary. */
|
||||
offset = (offset + dirent.file_ident_length + 3) & (~3);
|
||||
|
|
Loading…
Reference in a new issue