+2008-06-15 Robert Millan <rmh@aybabtu.com>
+
+ * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
+ extent-btree which is written as big endian on disk.
+ Reported by Alain Greppin <al@chilibi.org>.
+
2008-06-14 Robert Millan <rmh@aybabtu.com>
* util/i386/efi/grub-install.in (modules): Remove `_chain'.
/* sfs.c - Amiga Smart FileSystem. */
/*
* GRUB -- GRand Unified Bootloader
- * Copyright (C) 2005,2006,2007 Free Software Foundation, Inc.
+ * Copyright (C) 2005,2006,2007,2008 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
return grub_errno;
}
- for (i = 0; i < tree->nodes; i++)
+ for (i = 0; i < grub_be_to_cpu16 (tree->nodes); i++)
{
#define EXTNODE(tree, index) \
/* In case the last node is reached just use that one, it is
the right match. */
- if (i + 1 == tree->nodes && !tree->leaf)
+ if (i + 1 == grub_be_to_cpu16 (tree->nodes) && !tree->leaf)
{
next = grub_be_to_cpu32 (EXTNODE (tree, i)->data);
break;