From: Tyler Hall Date: Wed, 12 Apr 2017 20:29:16 +0000 (-0400) Subject: cramfs: block pointers are 32 bits X-Git-Tag: v2017.05-rc3~84 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a6ea791cb96f76fd600f6547a715e24ef66ba5e2;p=oweals%2Fu-boot.git cramfs: block pointers are 32 bits Using a variably-sized type is incorrect here since we're reading a fixed file format. Fixes cramfs on 64-bit platforms. Signed-off-by: Tyler Hall --- diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c index 05ed27240a..ca8bc5e12b 100644 --- a/fs/cramfs/cramfs.c +++ b/fs/cramfs/cramfs.c @@ -162,7 +162,7 @@ static int cramfs_uncompress (unsigned long begin, unsigned long offset, unsigned long loadoffset) { struct cramfs_inode *inode = (struct cramfs_inode *) (begin + offset); - unsigned long *block_ptrs = (unsigned long *) + u32 *block_ptrs = (u32 *) (begin + (CRAMFS_GET_OFFSET (inode) << 2)); unsigned long curr_block = (CRAMFS_GET_OFFSET (inode) + (((CRAMFS_24 (inode->size)) +