liblzma: Don't create an empty Block in lzma_stream_buffer_encode().
authorLasse Collin <lasse.collin@tukaani.org>
Mon, 11 Apr 2011 10:59:50 +0000 (13:59 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Mon, 11 Apr 2011 10:59:50 +0000 (13:59 +0300)
commitd1199274758049fc523d98c5b860ff814a799eec
treea94a713194803c300d18b848ddffb89fa463483b
parent3b22fc2c87ec85fcdd385c163b68fc49c97aa848
liblzma: Don't create an empty Block in lzma_stream_buffer_encode().

Empty Block was created if the input buffer was empty.
Empty Block wastes a few bytes of space, but more importantly
it triggers a bug in XZ Utils 5.0.1 and older when trying
to decompress such a file. 5.0.1 and older consider such
files to be corrupt. I thought that no encoder creates empty
Blocks when releasing 5.0.2 but I was wrong.
src/liblzma/common/stream_buffer_encoder.c