xfs: Don't attempt to iterate over empty directory.
Reported by: Tuomas Tynkkynen
This commit is contained in:
parent
e75cf4a58b
commit
c42acc23ff
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)
|
||||
- grub_be_to_cpu32 (tail->leaf_stale));
|
||||
|
||||
if (!entries)
|
||||
continue;
|
||||
|
||||
/* Iterate over all entries within this block. */
|
||||
while ((char *)direntry < (char *)tail)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue