1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00
xz-archive/tests
Lasse Collin d8db706acb liblzma: Fix possibility of incorrect LZMA_BUF_ERROR.
lzma_code() could incorrectly return LZMA_BUF_ERROR if
all of the following was true:

  - The caller knows how many bytes of output to expect
    and only provides that much output space.

  - When the last output bytes are decoded, the
    caller-provided input buffer ends right before
    the LZMA2 end of payload marker. So LZMA2 won't
    provide more output anymore, but it won't know it
    yet and thus won't return LZMA_STREAM_END yet.

  - A BCJ filter is in use and it hasn't left any
    unfiltered bytes in the temp buffer. This can happen
    with any BCJ filter, but in practice it's more likely
    with filters other than the x86 BCJ.

Another situation where the bug can be triggered happens
if the uncompressed size is zero bytes and no output space
is provided. In this case the decompression can fail even
if the whole input file is given to lzma_code().

A similar bug was fixed in XZ Embedded on 2011-09-19.
2012-05-28 20:42:11 +03:00
..
files Tests: Add a test file for the bug in the previous commit. 2011-05-28 08:46:04 +03:00
bcj_test.c Put the interesting parts of XZ Utils into the public domain. 2009-04-13 11:27:40 +03:00
compress_prepared_bcj_sparc Recreated the BCJ test files for x86 and SPARC. The old files 2009-02-06 09:13:15 +02:00
compress_prepared_bcj_x86 Recreated the BCJ test files for x86 and SPARC. The old files 2009-02-06 09:13:15 +02:00
create_compress_files.c Tests: Fix a compiler warning with _FORTIFY_SOURCE. 2012-01-10 17:13:03 +02:00
Makefile.am liblzma: Fix possibility of incorrect LZMA_BUF_ERROR. 2012-05-28 20:42:11 +03:00
test_bcj_exact_size.c liblzma: Fix possibility of incorrect LZMA_BUF_ERROR. 2012-05-28 20:42:11 +03:00
test_block.c Put the interesting parts of XZ Utils into the public domain. 2009-04-13 11:27:40 +03:00
test_block_header.c Use a tuklib module for integer handling. 2009-10-04 22:57:12 +03:00
test_check.c Put the interesting parts of XZ Utils into the public domain. 2009-04-13 11:27:40 +03:00
test_compress.sh Make tests accommodate missing xz or xzdec. 2010-10-08 15:32:29 +03:00
test_files.sh test_files.sh: Fix the first line. 2010-10-10 17:43:26 +03:00
test_filter_flags.c Remove references to the Subblock filter in xz and tests. 2010-05-27 13:42:44 +03:00
test_index.c Collection of language fixes to comments and docs. 2010-02-12 13:16:15 +02:00
test_scripts.sh Run the scripts with the correct shell in test_scripts.sh. 2011-08-06 20:37:28 +03:00
test_stream_flags.c Use a tuklib module for integer handling. 2009-10-04 22:57:12 +03:00
tests.h Use a tuklib module for integer handling. 2009-10-04 22:57:12 +03:00