aboutsummaryrefslogtreecommitdiff
path: root/tests/test_bcj_exact_size.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-02-14Add SPDX license identifier into 0BSD source code files.Lasse Collin1-0/+2
2024-02-14Change most public domain parts to 0BSD.Lasse Collin1-3/+0
Translations and doc/xz-file-format.txt and doc/lzma-file-format.txt were not touched. COPYING.0BSD was added.
2022-10-26Tests: test_bcj_exact_size skips properly now if PowerPC filter disabled.Jia Tan1-0/+3
2022-10-06Tests: Fix compilation issues.Jia Tan1-6/+14
test_bcj_exact_size, test_check, test_hardware, and test_index will all now compile and skip properly if encoders or decoders are disabled. Also fixed a small typo (disabed -> disabled). Thanks to Sebastian Andrzej Siewior.
2022-06-16Tests: tuktest.h: Rename file_from_* and use tuktest_malloc there.Lasse Collin1-3/+1
2022-06-14Tests: Use good-1-empty-bcj-lzma2.xz in test_bcj_exact_size.Lasse Collin1-12/+7
It's much nicer this way so that the test data isn't a hardcoded table inside the C file.
2022-06-02Tests: Convert test_bcj_exact_size to tuktest.Lasse Collin1-34/+41
The compress() and decompress() functions were merged because the later depends on the former so they need to be a single test case.
2015-05-13Tests: Fix a memory leak in test_bcj_exact_size.Lasse Collin1-0/+1
Thanks to Cristian Rodríguez.
2012-05-28liblzma: Fix possibility of incorrect LZMA_BUF_ERROR.Lasse Collin1-0/+112
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.