From: Nick Terrell Date: Fri, 13 Sep 2019 17:32:38 +0000 (-0700) Subject: [fuzz] Fix leak in block_round_trip X-Git-Tag: v1.4.4~1^2~51^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d721fcf3eecbda37b03209bbfd8b07d684956fb3;p=thirdparty%2Fzstd.git [fuzz] Fix leak in block_round_trip --- diff --git a/tests/fuzz/block_round_trip.c b/tests/fuzz/block_round_trip.c index 0f948d4fc..89f060a6e 100644 --- a/tests/fuzz/block_round_trip.c +++ b/tests/fuzz/block_round_trip.c @@ -60,7 +60,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *src, size_t size) size_t neededBufSize = size; if (size > ZSTD_BLOCKSIZE_MAX) - return 0; + size = ZSTD_BLOCKSIZE_MAX; /* Allocate all buffers and contexts if not already allocated */ if (neededBufSize > bufSize || !cBuf || !rBuf) {