9690fe69dc97eb2e7fe2804e4448a5278cde5411 |
|
19-Sep-2011 |
Lasse Collin <lasse.collin@tukaani.org> |
Fix incorrect XZ_BUF_ERROR. xz_dec_run() could incorrectly return XZ_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 XZ_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. This fixes <https://bugzilla.redhat.com/show_bug.cgi?id=735408> where Squashfs thinks that a valid file system is corrupt. Thanks to Jindrich Novy for telling me that such a bug report exists, Phillip Lougher for providing excellent debug info, and other people on #fedora-ppc. This also fixes a similar bug in single-call mode where the uncompressed size of a XZ Block using BCJ + LZMA2 was 0 bytes and caller provided no output space. Many empty .xz files don't contain any Blocks and thus don't trigger this bug. This also tweaks a closely related detail: xz_dec_bcj_run() could call xz_dec_lzma2_run() to decode into temp buffer when it was known to be useless. This was harmless although it wasted a minuscule number of CPU cycles.
/external/xz-embedded/linux/lib/xz/xz_dec_bcj.c
|
ef91abb814f7e9baa9018b8af184da3b422765ed |
|
25-Nov-2010 |
Lasse Collin <lasse.collin@tukaani.org> |
Fix coding style for real. I clearly wasn't fully awake with the commit ac313d. Thanks to Andrew Morton.
/external/xz-embedded/linux/lib/xz/xz_dec_bcj.c
|
bd4ca616fd7ba4559f9a0b5d399a4cd2d6fc75b6 |
|
25-Nov-2010 |
Lasse Collin <lasse.collin@tukaani.org> |
Remove noinline_for_stack. It's not needed to keep the stack usage of xz_dec_bcj_run() low because the BCJ filters get inlined into bcj_apply(), and that is not inlined into xz_dec_bcj_run(). Thanks to Andrew Morton.
/external/xz-embedded/linux/lib/xz/xz_dec_bcj.c
|
ac313daaa9608cdd6a74ae63dbfd8222860f0120 |
|
25-Nov-2010 |
Lasse Collin <lasse.collin@tukaani.org> |
Coding style fixes. Thanks to Andrew Morton.
/external/xz-embedded/linux/lib/xz/xz_dec_bcj.c
|
229fdc5b844e27cbe47e90518d6e78a4dd593b22 |
|
25-Nov-2010 |
Lasse Collin <lasse.collin@tukaani.org> |
Make bcj_x86_test_msbyte() an inline function. Thanks to Andrew Morton.
/external/xz-embedded/linux/lib/xz/xz_dec_bcj.c
|
4d5e69af1988ec17f76584a36347f8ef6f01d885 |
|
20-Nov-2010 |
Lasse Collin <lasse.collin@tukaani.org> |
Get rid of XZ_FUNC. In Linux 2.6.31 (or so) and earlier, the initramfs decompression had its own compiled copy of the decompression code that got thrown away after the kernel had booted. It required that all functions were marked with __init when built for initramfs decompression. Nowadays zlib and LZO have a wrapper that requires that the respective decompressor code has been been enabled (=y) in the kernel config. Only the wrapper is marked with __init. This patch helps doing the same with the XZ decompressor.
/external/xz-embedded/linux/lib/xz/xz_dec_bcj.c
|
7dabf0ef8731bb9cb001f37a7bfb9146bf2a362c |
|
30-May-2010 |
Lasse Collin <lasse.collin@tukaani.org> |
Make it simpler to build without BCJ filters. Now xz_dec_bcj.c can be compiled even when no BCJ filters are enabled (but only if the compiler supports files that don't export any symbols). It also allows #including it unconditionally in decompress_unxz.c.
/external/xz-embedded/linux/lib/xz/xz_dec_bcj.c
|
6013e9e9ea42683bdb2fe4964f68f1223000c7b1 |
|
01-Sep-2009 |
Lasse Collin <lasse.collin@tukaani.org> |
Fix infinite loop in single-call mode. If the input file has BCJ filter and the output buffer is too small in single-call mode, the LZMA2 decoder went into an infinite loop. The actual bug was in the BCJ decoder though, which called the LZMA2 decoder twice when the output buffer was too small.
/external/xz-embedded/linux/lib/xz/xz_dec_bcj.c
|
f88bf0850d6eace21ecdfc43d079093d205599e2 |
|
25-May-2009 |
Lasse Collin <lasse.collin@tukaani.org> |
Add XZ_EXTERN macro and use it to mark all functions with external linkage. This is needed to support marking those functions as static in some situations in the Linux kernel. XZ_EXTERN may be used for dllimport/dllexport too on some other operating systems.
/external/xz-embedded/linux/lib/xz/xz_dec_bcj.c
|
780d6ad3df286be9c6debf5f73c5647c27ef6cea |
|
26-Apr-2009 |
Lasse Collin <lasse.collin@tukaani.org> |
Split the userspace defitions from xz_private.h into xz_config.h, and generally clean up xz_private.h a little. Use get_unaligned_le32 and other macros provided by Linux in xz_dec_stream.c and xz_dec_bcj.c.
/external/xz-embedded/linux/lib/xz/xz_dec_bcj.c
|
d85055697ab0919d5ab8d70af61d8fa46e7dc330 |
|
17-Apr-2009 |
Lasse Collin <lasse.collin@tukaani.org> |
Added BCJ filter decoders.
/external/xz-embedded/linux/lib/xz/xz_dec_bcj.c
|