Commit 3ff4b188 for xz
commit 3ff4b18811920559d1e51ef9f75b2601d6df2e34
Author: hyc-alt <250169095+hyc-alt@users.noreply.github.com>
Date: Fri Nov 27 18:48:45 2026 +0800
liblzma: mt dec: Check for options == NULL
Link: https://github.com/tukaani-project/xz/pull/268
diff --git a/src/liblzma/common/stream_decoder_mt.c b/src/liblzma/common/stream_decoder_mt.c
index d7937e2c..14718aff 100644
--- a/src/liblzma/common/stream_decoder_mt.c
+++ b/src/liblzma/common/stream_decoder_mt.c
@@ -1901,6 +1901,9 @@ stream_decoder_mt_init(lzma_next_coder *next, const lzma_allocator *allocator,
{
struct lzma_stream_coder *coder;
+ if (options == NULL)
+ return LZMA_PROG_ERROR;
+
if (options->threads == 0 || options->threads > LZMA_THREADS_MAX)
return LZMA_OPTIONS_ERROR;