]> icculus.org git repositories - icculus/xz.git/commit
Fix alignment handling bugs in Subblock encoder.
authorLasse Collin <lasse.collin@tukaani.org>
Sun, 20 Jan 2008 18:12:58 +0000 (20:12 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Sun, 20 Jan 2008 18:12:58 +0000 (20:12 +0200)
commit107259e306bcfc2336a0fb870fb58034c28faa52
treedbecc0c35b706ff495de8fbda0eb5eb75b9ab0d4
parente141fe18950400faaa3503ff88ac20eacd73e88c
Fix alignment handling bugs in Subblock encoder.

This leaves one known alignment bug unfixed: If repeat count
doesn't fit into 28-bit integer, the encoder has to split
this to multiple Subblocks with Subblock Type `Repeating Data'.
The extra Subblocks may have wrong alignment. Correct alignment
is restored after the split Repeating Data has been completely
written out.

Since the encoder doesn't even try to fix the alignment unless
the size of Data is at least 4 bytes, to trigger this bug you
need at least 4 GiB of repeating data with sequence length of
4 or more bytes. Since the worst thing done by this bug is
misaligned data (no data corruption), this bug simply isn't
worth fixing, because a proper fix isn't simple.
src/liblzma/subblock/subblock_encoder.c