diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2014-12-10 16:58:15 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2014-12-10 16:58:15 (GMT) |
commit | e68d7dcf22d26300e6ce97395e52bcaabc28536f (patch) | |
tree | 310d8e3db9386503b9cc363bfcd9963de8b97086 /lib/lz4.c | |
parent | 3477cbac73ceee4fb7c77b7bae673877bd802d59 (diff) | |
download | lz4-e68d7dcf22d26300e6ce97395e52bcaabc28536f.zip lz4-e68d7dcf22d26300e6ce97395e52bcaabc28536f.tar.gz lz4-e68d7dcf22d26300e6ce97395e52bcaabc28536f.tar.bz2 |
Fixed : LZ4_compress_limitedOutput() bug, as reported by Christopher Speller
Diffstat (limited to 'lib/lz4.c')
-rw-r--r-- | lib/lz4.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -642,10 +642,10 @@ _next_match: ip += MINMATCH + matchLength; } + if ((outputLimited) && (unlikely(op + (1 + LASTLITERALS) + (matchLength>>8) > olimit))) + return 0; /* Check output limit */ if (matchLength>=ML_MASK) { - if ((outputLimited) && (unlikely(op + (1 + LASTLITERALS) + (matchLength>>8) > olimit))) - return 0; /* Check output limit */ *token += ML_MASK; matchLength -= ML_MASK; for (; matchLength >= 510 ; matchLength-=510) { *op++ = 255; *op++ = 255; } |