From: Yann Collet Date: Tue, 27 Feb 2018 02:27:51 +0000 (-0800) Subject: fixed wrong size test X-Git-Tag: v1.3.4~1^2~46^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33a3f188488e68e67fe15b73ecbf7e56f981088c;p=thirdparty%2Fzstd.git fixed wrong size test --- diff --git a/lib/compress/huf_compress.c b/lib/compress/huf_compress.c index 59c5c6c85..69007cd92 100644 --- a/lib/compress/huf_compress.c +++ b/lib/compress/huf_compress.c @@ -533,7 +533,7 @@ static size_t HUF_compress_internal ( /* checks & inits */ if (((size_t)workSpace & 3) != 0) return ERROR(GENERIC); /* must be aligned on 4-bytes boundaries */ - if (wkspSize < sizeof(table)) return ERROR(workSpace_tooSmall); + if (wkspSize < sizeof(*table)) return ERROR(workSpace_tooSmall); if (!srcSize) return 0; /* Uncompressed */ if (!dstSize) return 0; /* cannot fit anything within dst budget */ if (srcSize > HUF_BLOCKSIZE_MAX) return ERROR(srcSize_wrong); /* current block size limit */