uboot-lantiq: danube: fix hanging lzma kernel uncompression #2
[openwrt/staging/dedeckeh.git] / package / boot / uboot-lantiq / patches / 0030-lzma-force-8bit-reads.patch
index dc7d9ed7eeda5bae4a0b067e33c0fe516afeaa56..a934dab5cd6f21dc42bdbe7cd563a7aaffae2d43 100644 (file)
@@ -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;