From 9c3661926e8b7e9ee38b687cb197a0e98ecd3fb4 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Wed, 9 Sep 2026 14:14:40 +0300 Subject: [PATCH] Tests: fuzz_common.h: Reset next_out and avail_out It matters if the same lzma_stream is reused. --- tests/ossfuzz/fuzz_common.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/ossfuzz/fuzz_common.h b/tests/ossfuzz/fuzz_common.h index 0217ba36..489beacb 100644 --- a/tests/ossfuzz/fuzz_common.h +++ b/tests/ossfuzz/fuzz_common.h @@ -36,6 +36,9 @@ fuzz_code(lzma_stream *stream, const uint8_t *inbuf, size_t inbuf_size) stream->next_in = inbuf; stream->avail_in = inbuf_size / 2; + stream->next_out = NULL; + stream->avail_out = 0; + lzma_action action = LZMA_RUN; lzma_ret ret;