grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/4] xfs: Fix termination loop for directory iteration


From: Andrei Borzenkov
Subject: Re: [PATCH 2/4] xfs: Fix termination loop for directory iteration
Date: Mon, 11 May 2015 14:49:01 +0300

В Mon, 14 Jul 2014 17:21:29 +0200
Jan Kara <address@hidden> пишет:

> 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.
> 

Committed.

> Signed-off-by: Jan Kara <address@hidden>
> ---
>  grub-core/fs/xfs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
> index a2fc942707c1..ef3bc787e968 100644
> --- a/grub-core/fs/xfs.c
> +++ b/grub-core/fs/xfs.c
> @@ -608,8 +608,7 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
>                      - 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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]