From: proski Date: Wed, 13 May 2009 20:09:09 +0000 (+0000) Subject: 2009-05-13 Pavel Roskin X-Git-Tag: 1.98~918 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2c8c5f8f6d298bb07730c331402cf19c0fdafc9;p=thirdparty%2Fgrub.git 2009-05-13 Pavel Roskin * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the PX record is always little-endian. We only need the lower 2 bytes of the mode. --- diff --git a/ChangeLog b/ChangeLog index 4aea4cddb..65387ecf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-05-13 Pavel Roskin + * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the + PX record is always little-endian. We only need the lower 2 + bytes of the mode. + * fs/cpio.c: Use the same name "struct head" for tar and cpio to facilitate code reuse. (grub_cpio_mount): Use "struct head", not a char buffer. This diff --git a/fs/iso9660.c b/fs/iso9660.c index 140d8c213..32dfddbb3 100644 --- a/fs/iso9660.c +++ b/fs/iso9660.c @@ -521,8 +521,8 @@ grub_iso9660_iterate_dir (grub_fshelp_node_t dir, else if (grub_strncmp ((char *) entry->sig, "PX", 2) == 0) { /* At position 0 of the PX record the st_mode information is - stored. */ - grub_uint32_t mode = ((*(grub_uint32_t *) &entry->data[0]) + stored (little-endian). */ + grub_uint32_t mode = ((entry->data[0] + (entry->data[1] << 8)) & GRUB_ISO9660_FSTYPE_MASK); switch (mode)