From: Yann Collet Date: Mon, 10 Aug 2020 19:52:32 +0000 (-0700) Subject: Merge pull request #895 from lz4/hugefast X-Git-Tag: upstream/1.9.3~1^2~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b26c140a54a0d04fe71b0bfc3a24915b887308bc;p=platform%2Fupstream%2Flz4.git Merge pull request #895 from lz4/hugefast Fix #876 --- b26c140a54a0d04fe71b0bfc3a24915b887308bc diff --cc lib/lz4.c index 6322434,239a3f4..1cd7322 --- a/lib/lz4.c +++ b/lib/lz4.c @@@ -1497,8 -1520,10 +1505,9 @@@ int LZ4_compress_fast_continue (LZ4_str DEBUGLOG(5, "LZ4_compress_fast_continue (inputSize=%i)", inputSize); - if (streamPtr->dirty) { return 0; } /* Uninitialized structure detected */ LZ4_renormDictT(streamPtr, inputSize); /* avoid index overflow */ - if (acceleration < 1) acceleration = ACCELERATION_DEFAULT; + if (acceleration < 1) acceleration = LZ4_ACCELERATION_DEFAULT; + if (acceleration > LZ4_ACCELERATION_MAX) acceleration = LZ4_ACCELERATION_MAX; /* invalidate tiny dictionaries */ if ( (streamPtr->dictSize-1 < 4-1) /* intentional underflow */