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 7dce05666ced86f3d5773733763125a55d4be91c..89662b9a5f4d5ad912742ff3faca8f6cfb163af3 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;