liblzma: Validate encoder arguments better.
authorLasse Collin <lasse.collin@tukaani.org>
Mon, 11 Apr 2011 10:21:28 +0000 (13:21 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Mon, 11 Apr 2011 10:21:28 +0000 (13:21 +0300)
commit71b9380145dccf001f22e66a06b9d508905c25ce
tree76d7f8a717ec93d0f59371656f01c83a1f179979
parentec7e3dbad704268825fc48f0bdd4577bc46b4f13
liblzma: Validate encoder arguments better.

The biggest problem was that the integrity check type
wasn't validated, and e.g. lzma_easy_buffer_encode()
would create a corrupt .xz Stream if given an unsupported
Check ID. Luckily applications don't usually try to use
an unsupport Check ID, so this bug is unlikely to cause
many real-world problems.
src/liblzma/common/block_buffer_encoder.c
src/liblzma/common/block_encoder.c
src/liblzma/common/stream_buffer_encoder.c