diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2015-03-19 00:05:59 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2015-03-19 00:05:59 (GMT) |
commit | 86715b2541fc1fa70d66c0b6aa723685a61e6f56 (patch) | |
tree | 31dfa883f8618d308edb9b59a0b998b57c33a39b | |
parent | 7ee725645b58c201f11443d70210c2f986371b59 (diff) | |
download | lz4-86715b2541fc1fa70d66c0b6aa723685a61e6f56.zip lz4-86715b2541fc1fa70d66c0b6aa723685a61e6f56.tar.gz lz4-86715b2541fc1fa70d66c0b6aa723685a61e6f56.tar.bz2 |
Some more tests related to frame content size
-rw-r--r-- | lib/lz4.h | 4 | ||||
-rw-r--r-- | programs/frametest.c | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -48,8 +48,8 @@ extern "C" { * Version **************************************/ #define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */ -#define LZ4_VERSION_MINOR 5 /* for new (non-breaking) interface capabilities */ -#define LZ4_VERSION_RELEASE 1 /* for tweaks, bug-fixes, or development */ +#define LZ4_VERSION_MINOR 6 /* for new (non-breaking) interface capabilities */ +#define LZ4_VERSION_RELEASE 0 /* for tweaks, bug-fixes, or development */ #define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE) int LZ4_versionNumber (void); diff --git a/programs/frametest.c b/programs/frametest.c index 96ac3f9..2a087ec 100644 --- a/programs/frametest.c +++ b/programs/frametest.c @@ -582,6 +582,7 @@ int fuzzerTests(U32 seed, unsigned nbTests, unsigned startTest, double compressi unsigned nbBits = (FUZ_rand(&randState) % (FUZ_highbit(srcDataLength-1) - 1)) + 1; size_t srcSize = (FUZ_rand(&randState) & ((1<<nbBits)-1)) + 1; size_t srcStart = FUZ_rand(&randState) % (srcDataLength - srcSize); + U64 frameContentSize = ((FUZ_rand(&randState) & 0xF) == 1) ? srcSize : 0; size_t cSize; U64 crcOrig, crcDecoded; LZ4F_preferences_t* prefsPtr = &prefs; @@ -593,6 +594,7 @@ int fuzzerTests(U32 seed, unsigned nbTests, unsigned startTest, double compressi prefs.frameInfo.blockMode = (blockMode_t)BMId; prefs.frameInfo.blockSizeID = (blockSizeID_t)BSId; prefs.frameInfo.contentChecksumFlag = (contentChecksum_t)CCflag; + prefs.frameInfo.frameOSize = frameContentSize; prefs.autoFlush = autoflush; prefs.compressionLevel = FUZ_rand(&randState) % 5; if ((FUZ_rand(&randState) & 0xF) == 1) prefsPtr = NULL; |