1
0
mirror of https://git.tukaani.org/xz.git synced 2025-03-14 20:40:49 +00:00
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
..
2020-03-23 18:08:31 +02:00
2019-07-13 17:53:33 +03:00
2019-07-13 17:53:33 +03:00
2022-08-12 14:30:13 +03:00