Hello,

We are using libarchive library linking with liblzma from XZ Utils to extract 
zip archives compressed with lzma.
We have faced the following problem: lzma_code returned LZMA_BUF_ERROR when 
called from libarchive subroutine zip_read_data_zipx_lzma_alone.
We found out that libarchive does 3 subsequent calls to lzma_code. On the first 
one decoded content of the file is returned and size
of data is set appropriately. However, there's no EOF for some reason 
(libarchive expects EOF to break the infinite loop of reading data).
The second call to lzma_code returns no decoded data, data size is set to zero 
and some internal flag in lzma stream is set (allow_buf_error = false).
On the third call lzma_code returns LZMA_BUF_ERROR which libarchive treats as a 
fatal error. 
Could you give us the clue what can be the reason of such buffering error and 
how to overcome it (can it be done in lzma or in libarchive code?).
Our test data is valid archive (at least several tools can read it 
successfully).

Thanks.


Reply via email to