diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2015-05-20 07:58:59 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2015-05-20 07:58:59 (GMT) |
commit | 26065c3f47381c6ebe56ea114015b3c2b1c2a615 (patch) | |
tree | 7e327ecb91a65598ad1ecb091936bdeaa28a18bf /programs/lz4io.c | |
parent | 87e560ed8aa776a864c105f0ab064d45aca76cbd (diff) | |
download | lz4-26065c3f47381c6ebe56ea114015b3c2b1c2a615.zip lz4-26065c3f47381c6ebe56ea114015b3c2b1c2a615.tar.gz lz4-26065c3f47381c6ebe56ea114015b3c2b1c2a615.tar.bz2 |
Fixed : LZ4IO exits too early when frame crc not present, reported by Yongwoon Cho (#106)
Diffstat (limited to 'programs/lz4io.c')
-rw-r--r-- | programs/lz4io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/programs/lz4io.c b/programs/lz4io.c index 8b80fbc..dc0b9ec 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -851,7 +851,6 @@ static unsigned long long LZ4IO_decompressLZ4F(dRess_t ress, FILE* srcFile, FILE nextToLoad = LZ4F_decompress(ress.dCtx, ress.dstBuffer, &decodedBytes, (char*)(ress.srcBuffer)+pos, &remaining, NULL); if (LZ4F_isError(nextToLoad)) EXM_THROW(66, "Decompression error : %s", LZ4F_getErrorName(nextToLoad)); pos += remaining; - if (!nextToLoad) break; if (decodedBytes) { @@ -860,6 +859,8 @@ static unsigned long long LZ4IO_decompressLZ4F(dRess_t ress, FILE* srcFile, FILE DISPLAYUPDATE(2, "\rDecompressed : %u MB ", (unsigned)(filesize>>20)); storedSkips = LZ4IO_fwriteSparse(dstFile, ress.dstBuffer, decodedBytes, storedSkips); } + + if (!nextToLoad) break; } } |