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 <tylerwhall@gmail.com>
This commit is contained in:
Tyler Hall 2017-04-12 16:29:16 -04:00 committed by Tom Rini
parent 511c66b1e6
commit a6ea791cb9

View 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)) +