diff options
author | Nick Terrell <terrelln@fb.com> | 2019-07-17 18:07:24 (GMT) |
---|---|---|
committer | Nick Terrell <terrelln@fb.com> | 2019-07-17 18:07:24 (GMT) |
commit | 690009e2c2f9e5dcb0d40e7c0c40610ce6006eda (patch) | |
tree | f9a947d08983005ad143353a300b28ea143a59a0 /lib/lz4.c | |
parent | 7654a5a6d287e15e4c42b7d7386fbbd1b857f9e2 (diff) | |
download | lz4-690009e2c2f9e5dcb0d40e7c0c40610ce6006eda.zip lz4-690009e2c2f9e5dcb0d40e7c0c40610ce6006eda.tar.gz lz4-690009e2c2f9e5dcb0d40e7c0c40610ce6006eda.tar.bz2 |
[LZ4_compress_destSize] Allow 2 more bytes of match length
Diffstat (limited to 'lib/lz4.c')
-rw-r--r-- | lib/lz4.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1016,7 +1016,7 @@ _next_match: (unlikely(op + (1 + LASTLITERALS) + (matchCode>>8) > olimit)) ) { if (outputDirective == fillOutput) { /* Match description too long : reduce it */ - U32 newMatchCode = 15 /* in token */ - 1 /* to avoid needing a zero byte */ + ((U32)(olimit - op) - 2 - 1 - LASTLITERALS) * 255; + U32 newMatchCode = 15 /* in token */ - 1 /* to avoid needing a zero byte */ + ((U32)(olimit - op) - 1 - LASTLITERALS) * 255; ip -= matchCode - newMatchCode; matchCode = newMatchCode; } else { |