lantiq: Fix fw_cutter LzmaWrapper
authorChristian Franke <nobody@nowhere.ws>
Thu, 17 Oct 2019 13:12:05 +0000 (15:12 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 18 Oct 2019 11:39:34 +0000 (13:39 +0200)
The destination buffer size `d_len` is passed to `lzma_inflate` as a
pointer. Therefore, it needs to be dereferenced to compare its content.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
package/kernel/lantiq/ltq-vdsl-fw/src/LzmaWrapper.c

index 7dce056..89662b9 100644 (file)
@@ -153,7 +153,7 @@ int lzma_inflate(unsigned char *source, int s_len, unsigned char *dest, int *d_l
     outStream = 0;
   else
   {
-    if (outSizeFull > d_len)
+    if (outSizeFull > *d_len)
       outStream = 0;
     else
       outStream = dest;