projects
/
grub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e75cf4a
)
xfs: Don't attempt to iterate over empty directory.
author
Vladimir Serbinenko
<phcoder@gmail.com>
Wed, 30 Aug 2017 13:56:19 +0000
(15:56 +0200)
committer
Vladimir Serbinenko
<phcoder@gmail.com>
Wed, 30 Aug 2017 13:56:19 +0000
(15:56 +0200)
Reported by: Tuomas Tynkkynen
grub-core/fs/xfs.c
patch
|
blob
|
history
diff --git
a/grub-core/fs/xfs.c
b/grub-core/fs/xfs.c
index
9f66dd6
..
c6031bd
100644
(file)
--- a/
grub-core/fs/xfs.c
+++ b/
grub-core/fs/xfs.c
@@
-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)
{