1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00
xz-archive/tests/Makefile.am
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

55 lines
939 B
Makefile

##
## Author: Lasse Collin
##
## This file has been put into the public domain.
## You can do whatever you want with this file.
##
EXTRA_DIST = \
files \
tests.h \
test_files.sh \
test_compress.sh \
test_scripts.sh \
bcj_test.c \
compress_prepared_bcj_sparc \
compress_prepared_bcj_x86
AM_CPPFLAGS = \
-I$(top_srcdir)/src/common \
-I$(top_srcdir)/src/liblzma/api \
-I$(top_builddir)/lib
LDADD = $(top_builddir)/src/liblzma/liblzma.la
if COND_GNULIB
LDADD += $(top_builddir)/lib/libgnu.a
endif
LDADD += $(LTLIBINTL)
check_PROGRAMS = \
create_compress_files \
test_check \
test_stream_flags \
test_filter_flags \
test_block_header \
test_index \
test_bcj_exact_size
TESTS = \
test_check \
test_stream_flags \
test_filter_flags \
test_block_header \
test_index \
test_bcj_exact_size \
test_files.sh \
test_compress.sh
if COND_SCRIPTS
TESTS += test_scripts.sh
endif
clean-local:
-rm -f compress_generated_*