Commit 9c366192 for xz
commit 9c3661926e8b7e9ee38b687cb197a0e98ecd3fb4
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: Wed Sep 9 14:14:40 2026 +0300
Tests: fuzz_common.h: Reset next_out and avail_out
It matters if the same lzma_stream is reused.
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;