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.
Showing
- src/liblzma/common/block_buffer_encoder.c 12 additions, 6 deletionssrc/liblzma/common/block_buffer_encoder.c
- src/liblzma/common/block_encoder.c 5 additions, 0 deletionssrc/liblzma/common/block_encoder.c
- src/liblzma/common/stream_buffer_encoder.c 3 additions, 0 deletionssrc/liblzma/common/stream_buffer_encoder.c
Loading
Please register or sign in to comment