Skip to content

Commit ca7fc7e

Browse files
ddstreetherbertx
authored andcommitted
lib: correct 842 decompress for 32 bit
Avoid 64 bit mod operation, which won't work on 32 bit systems. Simple subtraction can be used instead in this case. Reported-By: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Dan Streetman <ddstreet@ieee.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 42e8b0d commit ca7fc7e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/842/842_decompress.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static int __do_index(struct sw842_param *p, u8 size, u8 bits, u64 fsize)
185185
/* this is where the current fifo is */
186186
u64 section = round_down(total, fsize);
187187
/* the current pos in the fifo */
188-
u64 pos = total % fsize;
188+
u64 pos = total - section;
189189

190190
/* if the offset is past/at the pos, we need to
191191
* go back to the last fifo section

0 commit comments

Comments
 (0)