fix : ZBUFF_compressEnd() gives right amount remaining to flush, including future epilogue
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
v0.7.1
|
v0.7.1
|
||||||
|
fixed : ZBUFF_compressEnd() called multiple times with too small `dst` buffer, reported by Christophe Chevalier
|
||||||
fixed : corruption issue, reported by cj
|
fixed : corruption issue, reported by cj
|
||||||
modified : checksum enabled by default in command line mode
|
modified : checksum enabled by default in command line mode
|
||||||
|
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ size_t ZBUFF_compressEnd(ZBUFF_CCtx* zbc, void* dst, size_t* dstCapacityPtr)
|
|||||||
op += outSize;
|
op += outSize;
|
||||||
if (remainingToFlush) {
|
if (remainingToFlush) {
|
||||||
*dstCapacityPtr = op-ostart;
|
*dstCapacityPtr = op-ostart;
|
||||||
return remainingToFlush;
|
return remainingToFlush + (ZSTD_BLOCKHEADERSIZE * (zbc->stage != ZBUFFcs_final));
|
||||||
} }
|
} }
|
||||||
|
|
||||||
if (zbc->stage == ZBUFFcs_final) { zbc->stage = ZBUFFcs_init; *dstCapacityPtr = op-ostart; return 0; }
|
if (zbc->stage == ZBUFFcs_final) { zbc->stage = ZBUFFcs_init; *dstCapacityPtr = op-ostart; return 0; }
|
||||||
|
|||||||
Reference in New Issue
Block a user