]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Remove dstCapacity error check
authorsenhuang42 <senhuang96@fb.com>
Fri, 6 Nov 2020 18:09:15 +0000 (13:09 -0500)
committersenhuang42 <senhuang96@fb.com>
Mon, 16 Nov 2020 15:49:17 +0000 (10:49 -0500)
lib/compress/zstd_compress.c

index 7975dcaeeff6bbc8ae329960b1a0703adee122e6..a0b6b42548cac62a5dda6dbef6223150f7340d34 100644 (file)
@@ -4792,9 +4792,6 @@ size_t ZSTD_compressSequences(ZSTD_CCtx* const cctx, void* dst, size_t dstCapaci
     DEBUGLOG(3, "ZSTD_compressSequences()");
     assert(cctx != NULL);
     FORWARD_IF_ERROR(ZSTD_CCtx_init_compressStream2(cctx, ZSTD_e_end, srcSize), "CCtx initialization failed");
-    if (dstCapacity < ZSTD_compressBound(srcSize)) {
-        RETURN_ERROR(dstSize_tooSmall, "Destination buffer too small!");
-    }
 
     /* Begin writing output, starting with frame header */
     frameHeaderSize = ZSTD_writeFrameHeader(op, dstCapacity, &cctx->appliedParams, srcSize, cctx->dictID);