xfs: Don't attempt to iterate over empty directory.
Reported by: Tuomas Tynkkynen
This commit is contained in:
parent
2da5f067f4
commit
88a43b3f8c
1 changed files with 3 additions and 0 deletions
|
@ -828,6 +828,9 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
|
||||||
entries = (grub_be_to_cpu32 (tail->leaf_count)
|
entries = (grub_be_to_cpu32 (tail->leaf_count)
|
||||||
- grub_be_to_cpu32 (tail->leaf_stale));
|
- grub_be_to_cpu32 (tail->leaf_stale));
|
||||||
|
|
||||||
|
if (!entries)
|
||||||
|
continue;
|
||||||
|
|
||||||
/* Iterate over all entries within this block. */
|
/* Iterate over all entries within this block. */
|
||||||
while ((char *)direntry < (char *)tail)
|
while ((char *)direntry < (char *)tail)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue