added parameter litCapacity
to ZSTD_compressSequencesAndLiterals() to enforce the litCapacity >= litSize+8 condition.
This commit is contained in:
+4
-2
@@ -1678,14 +1678,16 @@ ZSTD_compressSequences(ZSTD_CCtx* cctx,
|
||||
* - Not compatible with frame checksum, which must be disabled
|
||||
* - If any block is incompressible, will fail and return an error
|
||||
* - @litSize must be == sum of all @.litLength fields in @inSeqs. Any discrepancy will generate an error.
|
||||
* - the buffer @literals must be larger than @litSize by at least 8 bytes.
|
||||
* - the buffer @literals must have a size @litCapacity which is larger than @litSize by at least 8 bytes.
|
||||
* - @decompressedSize must be correct, and correspond to the sum of all Sequences. Any discrepancy will generate an error.
|
||||
* @return : final compressed size, or a ZSTD error code.
|
||||
*/
|
||||
ZSTDLIB_STATIC_API size_t
|
||||
ZSTD_compressSequencesAndLiterals(ZSTD_CCtx* cctx,
|
||||
void* dst, size_t dstCapacity,
|
||||
const ZSTD_Sequence* inSeqs, size_t nbSequences,
|
||||
const void* literals, size_t litSize, size_t srcSize);
|
||||
const void* literals, size_t litSize, size_t litCapacity,
|
||||
size_t decompressedSize);
|
||||
|
||||
|
||||
/*! ZSTD_writeSkippableFrame() :
|
||||
|
||||
Reference in New Issue
Block a user