diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2022-11-23 21:26:21 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2022-11-24 10:58:04 +0200 |
commit | f94a3e34603c56c55777056bb5412bfd0e948f0b (patch) | |
tree | 6cd911260426b112019cea5bc4637e7d07a08c06 /src/liblzma/api | |
parent | liblzma: Fix language in a comment. (diff) | |
download | xz-f94a3e34603c56c55777056bb5412bfd0e948f0b.tar.xz |
liblzma: Fix invalid free() after memory allocation failure.
The bug was in the single-threaded .xz Stream encoder
in the code that is used for both re-initialization and for
lzma_filters_update(). To trigger it, an application had
to either re-initialize an existing encoder instance with
lzma_stream_encoder() or use lzma_filters_update(), and
then one of the 1-4 tiny allocations in lzma_filters_copy()
(called from stream_encoder_update()) must fail. An error
was correctly reported but the encoder state was corrupted.
This is related to the recent fix in
f8ee61e74eb40600445fdb601c374d582e1e9c8a which is good but
it wasn't enough to fix the main problem in stream_encoder.c.
Diffstat (limited to 'src/liblzma/api')
0 files changed, 0 insertions, 0 deletions