From 462918560c0234ce69637f73ddc5193bad9515f1 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Mon, 8 Apr 2019 21:06:19 -0700 Subject: [PATCH] [fuzzer] Fix stream_round_trip for the new options --- tests/fuzz/stream_round_trip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fuzz/stream_round_trip.c b/tests/fuzz/stream_round_trip.c index d903bcb29..d13c2dbe7 100644 --- a/tests/fuzz/stream_round_trip.c +++ b/tests/fuzz/stream_round_trip.c @@ -63,7 +63,7 @@ static size_t compress(uint8_t *dst, size_t capacity, ZSTD_inBuffer in = makeInBuffer(&src, &srcSize); /* Mode controls the action. If mode == -1 we pick a new mode */ int mode = -1; - while (in.pos < in.size) { + while (in.pos < in.size || mode != -1) { ZSTD_outBuffer out = makeOutBuffer(dst, capacity); /* Previous action finished, pick a new mode. */ if (mode == -1) mode = FUZZ_rand(&seed) % 10; -- 2.47.2