1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00
xz-archive/src/liblzma/common
Lasse Collin f94da15120 liblzma: lzma_filters_copy: Keep dest[] unmodified if an error occurs.
lzma_stream_encoder() and lzma_stream_encoder_mt() always assumed
this. Before this patch, failing lzma_filters_copy() could result
in free(invalid_pointer) or invalid memory reads in stream_encoder.c
or stream_encoder_mt.c.

To trigger this, allocating memory for a filter options structure
has to fail. These are tiny allocations so in practice they very
rarely fail.

Certain badness in the filter chain array could also make
lzma_filters_copy() fail but both stream_encoder.c and
stream_encoder_mt.c validate the filter chain before
trying to copy it, so the crash cannot occur this way.
2022-09-17 00:22:11 +03:00
..
alone_decoder.c liblzma: Add optional autodetection of LZMA end marker. 2022-07-24 11:36:56 +03:00
alone_decoder.h liblzma: Be less picky in lzma_alone_decoder(). 2013-03-23 22:25:15 +02:00
alone_encoder.c Rename unaligned_read32ne to read32ne, and similarly for the others. 2019-12-31 22:41:45 +02:00
auto_decoder.c liblzma: Fix lzma_memlimit_set(strm, 0). 2017-03-30 19:52:24 +03:00
block_buffer_decoder.c liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
block_buffer_encoder.c liblzma: Vaccinate against an ill patch from RHEL/CentOS 7. 2022-09-16 19:30:05 +03:00
block_buffer_encoder.h liblzma: Add lzma_block_uncomp_encode(). 2013-03-23 19:17:33 +02:00
block_decoder.c liblzma: Make Block decoder catch certain types of errors better. 2022-07-12 19:30:40 +03:00
block_decoder.h liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
block_encoder.c liblzma: Avoid multiple definitions of lzma_coder structures. 2016-12-28 19:59:32 +02:00
block_encoder.h liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
block_header_decoder.c Rename unaligned_read32ne to read32ne, and similarly for the others. 2019-12-31 22:41:45 +02:00
block_header_encoder.c Rename unaligned_read32ne to read32ne, and similarly for the others. 2019-12-31 22:41:45 +02:00
block_util.c liblzma: Fix comments. 2019-12-31 22:19:18 +02:00
common.c liblzma: Vaccinate against an ill patch from RHEL/CentOS 7. 2022-09-16 19:30:05 +03:00
common.h liblzma: Vaccinate against an ill patch from RHEL/CentOS 7. 2022-09-16 19:30:05 +03:00
easy_buffer_encoder.c liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
easy_decoder_memusage.c Put the interesting parts of XZ Utils into the public domain. 2009-04-13 11:27:40 +03:00
easy_encoder.c liblzma: Make lzma_stream_encoder_init() static (second try). 2011-04-11 09:27:57 +03:00
easy_encoder_memusage.c Put the interesting parts of XZ Utils into the public domain. 2009-04-13 11:27:40 +03:00
easy_preset.c Put the interesting parts of XZ Utils into the public domain. 2009-04-13 11:27:40 +03:00
easy_preset.h Put the interesting parts of XZ Utils into the public domain. 2009-04-13 11:27:40 +03:00
filter_buffer_decoder.c liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
filter_buffer_encoder.c liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
filter_common.c liblzma: lzma_filters_copy: Keep dest[] unmodified if an error occurs. 2022-09-17 00:22:11 +03:00
filter_common.h liblzma: Fix comments. 2019-12-31 22:19:18 +02:00
filter_decoder.c liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
filter_decoder.h liblzma: Fix comments. 2019-12-31 22:19:18 +02:00
filter_encoder.c liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
filter_encoder.h liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
filter_flags_decoder.c liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
filter_flags_encoder.c liblzma: Fix comments. 2019-12-31 22:19:18 +02:00
hardware_cputhreads.c liblzma: Vaccinate against an ill patch from RHEL/CentOS 7. 2022-09-16 19:30:05 +03:00
hardware_physmem.c spelling 2019-07-13 17:53:33 +03:00
index.c liblzma: lzma_index_append: Add missing integer overflow check. 2022-09-17 00:21:54 +03:00
index.h Revised the Index handling code. 2009-12-31 22:45:53 +02:00
index_decoder.c liblzma: Fix handling of memlimit == 0 in lzma_index_decoder(). 2017-03-30 19:52:24 +03:00
index_encoder.c liblzma: Avoid multiple definitions of lzma_coder structures. 2016-12-28 19:59:32 +02:00
index_encoder.h liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
index_hash.c liblzma: Index hash: Change return value type of hash_append() to void. 2022-07-12 19:30:40 +03:00
Makefile.inc Build: Don't omit lzma_cputhreads() unless using --disable-threads. 2016-06-28 21:09:46 +03:00
memcmplen.h Rename unaligned_read32ne to read32ne, and similarly for the others. 2019-12-31 22:41:45 +02:00
outqueue.c liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
outqueue.h liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
stream_buffer_decoder.c liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
stream_buffer_encoder.c liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
stream_decoder.c liblzma: Similar memlimit fix for stream_, alone_, and auto_decoder. 2017-03-30 19:52:24 +03:00
stream_decoder.h liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
stream_encoder.c liblzma: Avoid multiple definitions of lzma_coder structures. 2016-12-28 19:59:32 +02:00
stream_encoder_mt.c liblzma: Vaccinate against an ill patch from RHEL/CentOS 7. 2022-09-16 19:30:05 +03:00
stream_flags_common.c Put the interesting parts of XZ Utils into the public domain. 2009-04-13 11:27:40 +03:00
stream_flags_common.h Put the interesting parts of XZ Utils into the public domain. 2009-04-13 11:27:40 +03:00
stream_flags_decoder.c Rename unaligned_read32ne to read32ne, and similarly for the others. 2019-12-31 22:41:45 +02:00
stream_flags_encoder.c Rename unaligned_read32ne to read32ne, and similarly for the others. 2019-12-31 22:41:45 +02:00
vli_decoder.c spelling 2019-07-13 17:53:33 +03:00
vli_encoder.c Fix incorrect use of "restrict". 2009-09-15 21:07:23 +03:00
vli_size.c Put the interesting parts of XZ Utils into the public domain. 2009-04-13 11:27:40 +03:00