]> icculus.org git repositories - icculus/xz.git/commit
Subtle change to liblzma Block handling API.
authorLasse Collin <lasse.collin@tukaani.org>
Sun, 7 Feb 2010 17:48:06 +0000 (19:48 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Sun, 7 Feb 2010 17:48:06 +0000 (19:48 +0200)
commit6503fde658a5cdbdd907a788865470dd64771601
tree5a00ae67d08d92291469cdc705393eaac0dae978
parentdd7c3841ff78cb94ce02b0220c6e4748460970f7
Subtle change to liblzma Block handling API.

lzma_block.version has to be initialized even for
lzma_block_header_decode(). This way a future version
of liblzma won't allocate memory in a way that an old
application doesn't know how to free it.

The subtlety of this change is that all current apps
using lzma_block_header_decode() will keep working for
now, because the only possible version value is zero,
and lzma_block_header_decode() unconditionally sets the
version to zero even now. Unless fixed, these apps will
break in the future if a new version of the Block options
is ever needed.
src/liblzma/api/lzma/block.h
src/liblzma/common/stream_decoder.c