Skip to content

Commit

Permalink
uboot-lantiq: danube: fix hanging lzma kernel uncompression openwrt#2
Browse files Browse the repository at this point in the history
Follow up to commit 565b62c. Managed to
hit the very same issue again while playing with the NOR SPL builds.

Signed-off-by: Mathias Kresin <dev@kresin.me>
  • Loading branch information
mkresin committed Nov 27, 2021
1 parent 6f5c27e commit b7befd8
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -37,6 +37,15 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>

#define kNumTopBits 24
#define kTopValue ((UInt32)1 << kNumTopBits)
@@ -703,7 +704,7 @@ static ELzmaDummy LzmaDec_TryDummy(const

static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data)
{
- p->code = ((UInt32)data[1] << 24) | ((UInt32)data[2] << 16) | ((UInt32)data[3] << 8) | ((UInt32)data[4]);
+ p->code = ((UInt32)readb(&data[1]) << 24) | ((UInt32)readb(&data[2]) << 16) | ((UInt32)readb(&data[3]) << 8) | ((UInt32)readb(&data[4]));
p->range = 0xFFFFFFFF;
p->needFlush = 0;
}
@@ -929,7 +930,7 @@ SRes LzmaProps_Decode(CLzmaProps *p, con
if (size < LZMA_PROPS_SIZE)
return SZ_ERROR_UNSUPPORTED;
Expand Down

0 comments on commit b7befd8

Please sign in to comment.