From: Lasse Collin Date: Tue, 7 May 2024 16:56:46 +0000 (+0300) Subject: liblzma: Set all values in lzma_lz_encoder to NULL after allocation. X-Git-Tag: v5.2.13~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74d36a57c5fe65e5447f61a6ed0b57c6bb7c4f0f;p=thirdparty%2Fxz.git liblzma: Set all values in lzma_lz_encoder to NULL after allocation. This is unlikely to be a bug in an existing application since it relies on calling lzma_filters_update() on an LZMA1 encoder in the first place. For instance, it does not affect xz because lzma_filters_update() can only be used when encoding to the .xz format. (based on commit 8191720eac950a5db89c4d33d6beea6316a49b19) --- diff --git a/src/liblzma/lz/lz_encoder.c b/src/liblzma/lz/lz_encoder.c index e6a49fb1..1cca9bed 100644 --- a/src/liblzma/lz/lz_encoder.c +++ b/src/liblzma/lz/lz_encoder.c @@ -548,6 +548,7 @@ lzma_lz_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, coder->lz.coder = NULL; coder->lz.code = NULL; coder->lz.end = NULL; + coder->lz.options_update = NULL; // mf.size is initialized to silence Valgrind // when used on optimized binaries (GCC may reorder