summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Hall <tylerwhall@gmail.com>2017-04-12 23:29:16 +0300
committerDongjin Kim <tobetter@gmail.com>2020-05-06 07:22:59 +0300
commite34273f9b549f1a0af185abd0460537d598fd861 (patch)
tree7f0af9cc4fdafe7339531af14eb3a6a1bc12a8be
parent94642644e8d50fe3f40b8f3806b2e743651d8ec1 (diff)
downloadu-boot-e34273f9b549f1a0af185abd0460537d598fd861.tar.xz
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> Change-Id: Ifd9a89ec7c056fed732067c69a03e7fcf9651c57
-rw-r--r--fs/cramfs/cramfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c
index fd8e4ef31e..311ac4a5f7 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)) +