ZSTDMT_endStream : nullify input buffer after flush

There will be no more input after ZSTDMT_endStream invocation :
only flush/end is allowed (to fully collect compressed result).
This commit is contained in:
Yann Collet
2017-01-18 15:32:38 -08:00
parent 3a01c46b26
commit 6073b3e6b8
+2
View File
@@ -543,6 +543,8 @@ static size_t ZSTDMT_flushStream_internal(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* outp
return ERROR(memory_allocation);
}
} else {
zcs->inBuff.buffer = g_nullBuffer;
zcs->inBuff.filled = 0;
zcs->frameEnded = 1;
}