summaryrefslogtreecommitdiffstats
path: root/tests/fuzzer.c
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-03-16 09:16:24 (GMT)
committerYann Collet <cyan@fb.com>2017-03-16 09:16:24 (GMT)
commit430b7d32b3f804ece3be95f0b36fb584947d6c73 (patch)
tree46f2cea47b2e93674a5288ffff93a0290acdb7bc /tests/fuzzer.c
parent9144520dc986db9fffcdc9e2afecdb9db226a756 (diff)
downloadlz4-430b7d32b3f804ece3be95f0b36fb584947d6c73.zip
lz4-430b7d32b3f804ece3be95f0b36fb584947d6c73.tar.gz
lz4-430b7d32b3f804ece3be95f0b36fb584947d6c73.tar.bz2
created LZ4_HC_STATIC_LINKING_ONLY section
where are exposed new prototypes *_destSize()
Diffstat (limited to 'tests/fuzzer.c')
-rw-r--r--tests/fuzzer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/fuzzer.c b/tests/fuzzer.c
index 6da0ea5..c63ecb2 100644
--- a/tests/fuzzer.c
+++ b/tests/fuzzer.c
@@ -43,6 +43,7 @@
#include <stdio.h> /* fgets, sscanf */
#include <string.h> /* strcmp */
#include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */
+#define LZ4_HC_STATIC_LINKING_ONLY
#include "lz4hc.h"
#define XXH_STATIC_LINKING_ONLY
#include "xxhash.h"
@@ -353,11 +354,11 @@ static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double c
FUZ_DISPLAYTEST;
{ int srcSize = blockSize;
int const targetSize = srcSize * ((FUZ_rand(&randState) & 127)+1) >> 7;
- char endCheck = FUZ_rand(&randState) & 255;
- void * ctx = LZ4_createHC(block);
+ char const endCheck = FUZ_rand(&randState) & 255;
+ void* ctx = LZ4_createHC(block);
FUZ_CHECKTEST(ctx==NULL, "LZ4_createHC() allocation failed");
compressedBuffer[targetSize] = endCheck;
- ret = LZ4_compressHC_destSize(ctx, block, compressedBuffer, &srcSize, targetSize, compressionLevel);
+ ret = LZ4_compress_HC_destSize(ctx, block, compressedBuffer, &srcSize, targetSize, compressionLevel);
LZ4_freeHC(ctx);
FUZ_CHECKTEST(ret > targetSize, "LZ4_compressHC_destSize() result larger than dst buffer !");
FUZ_CHECKTEST(compressedBuffer[targetSize] != endCheck, "LZ4_compressHC_destSize() overwrite dst buffer !");