diff options
Diffstat (limited to 'lib/sqfs/comp')
-rw-r--r-- | lib/sqfs/comp/lzma.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqfs/comp/lzma.c b/lib/sqfs/comp/lzma.c index 0238df0..002376f 100644 --- a/lib/sqfs/comp/lzma.c +++ b/lib/sqfs/comp/lzma.c @@ -98,10 +98,10 @@ static sqfs_s32 lzma_uncomp_block(sqfs_compressor_t *base, const sqfs_u8 *in, if (size < sizeof(lzma_header)) return SQFS_ERROR_CORRUPTED; - hdrsize = in[LZMA_SIZE_OFFSET] | - (in[LZMA_SIZE_OFFSET + 1] << 8) | - (in[LZMA_SIZE_OFFSET + 2] << 16) | - (in[LZMA_SIZE_OFFSET + 3] << 24); + hdrsize = (size_t)in[LZMA_SIZE_OFFSET] | + ((size_t)in[LZMA_SIZE_OFFSET + 1] << 8) | + ((size_t)in[LZMA_SIZE_OFFSET + 2] << 16) | + ((size_t)in[LZMA_SIZE_OFFSET + 3] << 24); if (hdrsize > outsize) return 0; |