]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed wrong size test 1025/head
authorYann Collet <cyan@fb.com>
Tue, 27 Feb 2018 02:27:51 +0000 (18:27 -0800)
committerYann Collet <cyan@fb.com>
Tue, 27 Feb 2018 02:27:51 +0000 (18:27 -0800)
lib/compress/huf_compress.c

index 59c5c6c853cde5af0f19b9cf309e72058340f9a4..69007cd924fab7fea3e228a7138b170c5bc39888 100644 (file)
@@ -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 */