]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
cramfs: block pointers are 32 bits
authorTyler Hall <tylerwhall@gmail.com>
Wed, 12 Apr 2017 20:29:16 +0000 (16:29 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 18 Apr 2017 14:27:57 +0000 (10:27 -0400)
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 <tylerwhall@gmail.com>
fs/cramfs/cramfs.c

index 05ed27240a1a1dd7dd6c79766c95e93205f24975..ca8bc5e12b8499796746dc133e15d1c49f0649a7 100644 (file)
@@ -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)) +