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 5761603265 liblzma: Fix handling of memlimit == 0 in lzma_index_decoder().
It returned LZMA_PROG_ERROR, which was done to avoid zero as
the limit (because it's a special value elsewhere), but using
LZMA_PROG_ERROR is simply inconvenient and can cause bugs.

The fix/workaround is to treat 0 as if it were 1 byte. It's
effectively the same thing. The only weird consequence is
that then lzma_memlimit_get() will return 1 even when 0 was
specified as the limit.

This fixes a very rare corner case in xz --list where a specific
memory usage limit and a multi-stream file could print the
error message "Internal error (bug)" instead of saying that
the memory usage limit is too low.
2017-03-30 19:52:24 +03:00
..
alone_decoder.c liblzma: Avoid multiple definitions of lzma_coder structures. 2016-12-28 19:59:32 +02:00
alone_decoder.h liblzma: Be less picky in lzma_alone_decoder(). 2013-03-23 22:25:15 +02:00
alone_encoder.c liblzma: Avoid multiple definitions of lzma_coder structures. 2016-12-28 19:59:32 +02:00
auto_decoder.c liblzma: Avoid multiple definitions of lzma_coder structures. 2016-12-28 19:59:32 +02: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: Add support for lzma_block.ignore_check. 2014-08-05 22:03:30 +03:00
block_buffer_encoder.h liblzma: Add lzma_block_uncomp_encode(). 2013-03-23 19:17:33 +02:00
block_decoder.c liblzma: Avoid multiple definitions of lzma_coder structures. 2016-12-28 19:59:32 +02: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 liblzma: Add support for lzma_block.ignore_check. 2014-08-05 22:03:30 +03:00
block_header_encoder.c liblzma: Add support for lzma_block.ignore_check. 2014-08-05 22:03:30 +03:00
block_util.c liblzma: Add support for lzma_block.ignore_check. 2014-08-05 22:03:30 +03:00
common.c liblzma: Add the internal function lzma_alloc_zero(). 2014-05-25 19:25:57 +03:00
common.h liblzma: Avoid multiple definitions of lzma_coder structures. 2016-12-28 19:59:32 +02: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: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
filter_common.h liblzma: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03: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: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03: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 Put the interesting parts of XZ Utils into the public domain. 2009-04-13 11:27:40 +03:00
hardware_cputhreads.c liblzma: Add lzma_cputhreads(). 2014-06-18 22:04:24 +03:00
hardware_physmem.c Add lzma_physmem(). 2009-11-15 12:40:17 +02:00
index.c liblzma: Fix a memory leak in error path of lzma_index_dup(). 2016-12-26 17:57:51 +02: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: Make the use of lzma_allocator const-correct. 2012-07-17 18:19:59 +03:00
Makefile.inc Build: Don't omit lzma_cputhreads() unless using --disable-threads. 2016-06-28 21:09:46 +03:00
memcmplen.h liblzma: Set LZMA_MEMCMPLEN_EXTRA depending on the compare method. 2015-01-26 21:24:39 +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: Avoid multiple definitions of lzma_coder structures. 2016-12-28 19:59:32 +02: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: Avoid multiple definitions of lzma_coder structures. 2016-12-28 19:59:32 +02: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 Use a tuklib module for integer handling. 2009-10-04 22:57:12 +03:00
stream_flags_encoder.c Use a tuklib module for integer handling. 2009-10-04 22:57:12 +03:00
vli_decoder.c Collection of language fixes to comments and docs. 2010-02-12 13:16:15 +02: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