diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2018-12-09 19:29:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-09 19:29:43 (GMT) |
commit | 16400fb79017b1b2dd86a4a864f65930fe8586a2 (patch) | |
tree | afea2cf53ed2bd6fc2dc37edfd63b7dc381c26ee /lib | |
parent | 077caefae6eb8c38e6264a41ae637499d2114235 (diff) | |
parent | 4e3accccb221c2e5dac90efec823a4b13fed70ae (diff) | |
download | lz4-16400fb79017b1b2dd86a4a864f65930fe8586a2.zip lz4-16400fb79017b1b2dd86a4a864f65930fe8586a2.tar.gz lz4-16400fb79017b1b2dd86a4a864f65930fe8586a2.tar.bz2 |
Merge pull request #616 from felixhandte/lz4-attach-reject-short-dicts
Fix LZ4_compress_fast_continue() Prefix Size Check
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1319,7 +1319,7 @@ int LZ4_compress_fast_continue (LZ4_stream_t* LZ4_stream, const char* source, ch if (acceleration < 1) acceleration = ACCELERATION_DEFAULT; /* invalidate tiny dictionaries */ - if ( (streamPtr->dictSize-1 < 4) /* intentional underflow */ + if ( (streamPtr->dictSize-1 < 4-1) /* intentional underflow */ && (dictEnd != (const BYTE*)source) ) { DEBUGLOG(5, "LZ4_compress_fast_continue: dictSize(%u) at addr:%p is too small", streamPtr->dictSize, streamPtr->dictionary); streamPtr->dictSize = 0; |