Directory iteration used wrong position (sizeof wrong structure) for
termination of iteration inside a directory block. Luckily the position
ended up being wrong by just 1 byte and directory entries are larger so
things worked out fine in practice. But fix the problem anyway.
Signed-off-by: Jan Kara <jack@suse.cz>
- grub_be_to_cpu32 (tail->leaf_stale));
/* Iterate over all entries within this block. */
- while (pos < (dirblk_size
- - (int) sizeof (struct grub_xfs_dir2_entry)))
+ while (pos < tail_start)
{
struct grub_xfs_dir2_entry *direntry;
grub_uint8_t *freetag;