xfs: Don't attempt to iterate over empty directory.

Reported by: Tuomas Tynkkynen
This commit is contained in:
Vladimir Serbinenko committed 2017-08-30 15:56:19 +02:00
1 parent e75cf4a58b
commit c42acc23ff
1 file changed
+3
+3
View File
@@ -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)
{