mirror of
https://github.com/lz4/lz4.git
synced 2026-10-24 01:48:57 +03:00
The kernel's legacy decoder also stops at a zero Block Compressed Size, and initramfs builders (mkinitcpio) append these four zero bytes to delimit concatenated archives. lz4 passed it to LZ4_decompress_safe() as an empty block, and failed with "Error 64 : Decoding Failed". A zero block size now ends the legacy frame, in both legacy decoders and in --list, and decoding continues with the next frame, if any. It was never a valid block : a compressed block is at least 1 byte. The format spec (v1.6.5) documents it as an extension : encoders should not produce it, since older decoders reject it. Fixes #1889, based on #1890 by @agamal026