diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2014-12-16 01:13:19 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2014-12-16 01:13:19 (GMT) |
commit | 95cc6cef6444b202a93ba414b7a9996eb2c72ca3 (patch) | |
tree | 3a2a7c48aa32847b5e132ba815609b427bdfbb7f /lib/lz4hc.c | |
parent | 7a8cd6996072f53f83ded52a325a4c4a4aed5a35 (diff) | |
download | lz4-95cc6cef6444b202a93ba414b7a9996eb2c72ca3.zip lz4-95cc6cef6444b202a93ba414b7a9996eb2c72ca3.tar.gz lz4-95cc6cef6444b202a93ba414b7a9996eb2c72ca3.tar.bz2 |
Fixed : bug within LZ4 HC streaming mode, reported by James Boyle
Diffstat (limited to 'lib/lz4hc.c')
-rw-r--r-- | lib/lz4hc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c index 45f1208..ef3997b 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -693,6 +693,7 @@ int LZ4_saveDictHC (LZ4_streamHC_t* LZ4_streamHCPtr, char* safeBuffer, int dictS streamPtr->base = streamPtr->end - endIndex; streamPtr->dictLimit = endIndex - dictSize; streamPtr->lowLimit = endIndex - dictSize; + if (streamPtr->nextToUpdate < streamPtr->dictLimit) streamPtr->nextToUpdate = streamPtr->dictLimit; } return dictSize; } |