1
0
mirror of https://github.com/facebook/zstd.git synced 2025-03-07 01:10:04 +02:00

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

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;
}