* grub-core/fs/xfs.c (grub_xfs_iterate_dir): Use grub_get_unaligned16
to get freetag and skip.
This commit is contained in:
parent
eb561f3123
commit
728cba91d2
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/xfs.c (grub_xfs_iterate_dir): Use grub_get_unaligned16
|
||||
to get freetag and skip.
|
||||
|
||||
2011-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/nilfs2.c (grub_nilfs2_btree_node): Add zero-size keys
|
||||
|
|
|
@ -589,18 +589,18 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
|
|||
- (int) sizeof (struct grub_xfs_dir2_entry)))
|
||||
{
|
||||
struct grub_xfs_dir2_entry *direntry;
|
||||
grub_uint16_t *freetag;
|
||||
grub_uint8_t *freetag;
|
||||
char *filename;
|
||||
|
||||
direntry = (struct grub_xfs_dir2_entry *) &dirblock[pos];
|
||||
freetag = (grub_uint16_t *) direntry;
|
||||
freetag = (grub_uint8_t *) direntry;
|
||||
|
||||
if (*freetag == 0XFFFF)
|
||||
if (grub_get_unaligned16 (freetag) == 0XFFFF)
|
||||
{
|
||||
grub_uint16_t *skip = (grub_uint16_t *) (freetag + 1);
|
||||
grub_uint8_t *skip = (freetag + sizeof (grub_uint16_t));
|
||||
|
||||
/* This entry is not used, go to the next one. */
|
||||
pos += grub_be_to_cpu16 (*skip);
|
||||
pos += grub_be_to_cpu16 (grub_get_unaligned16 (skip));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue