From d721fcf3eecbda37b03209bbfd8b07d684956fb3 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Fri, 13 Sep 2019 10:32:38 -0700 Subject: [PATCH] [fuzz] Fix leak in block_round_trip --- tests/fuzz/block_round_trip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fuzz/block_round_trip.c b/tests/fuzz/block_round_trip.c index 0f948d4f..89f060a6 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) {