Skip to content
Snippets Groups Projects
Commit a6ea791c authored by Tyler Hall's avatar Tyler Hall Committed by Tom Rini
Browse files

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: default avatarTyler Hall <tylerwhall@gmail.com>
parent 511c66b1
No related branches found
No related tags found
No related merge requests found
...@@ -162,7 +162,7 @@ static int cramfs_uncompress (unsigned long begin, unsigned long offset, ...@@ -162,7 +162,7 @@ static int cramfs_uncompress (unsigned long begin, unsigned long offset,
unsigned long loadoffset) unsigned long loadoffset)
{ {
struct cramfs_inode *inode = (struct cramfs_inode *) (begin + offset); 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)); (begin + (CRAMFS_GET_OFFSET (inode) << 2));
unsigned long curr_block = (CRAMFS_GET_OFFSET (inode) + unsigned long curr_block = (CRAMFS_GET_OFFSET (inode) +
(((CRAMFS_24 (inode->size)) + (((CRAMFS_24 (inode->size)) +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment