The check for end of file (avail == 0) happens after the check for a
NULL return value of __archive_read_filter_ahead.
Remove it, because at this stage, it's definitely truncated, not just
end of file.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
if (ret > max_in)
ret = max_in;
state->stream.avail_in = (uint32_t)ret;
- /* There is no more data, return whatever we have. */
- if (ret == 0) {
- state->eof = 1;
- *p = state->out_block;
- decompressed = state->stream.next_out
- - state->out_block;
- return (decompressed);
- }
/* Decompress as much as we can in one pass. */
ret = BZ2_bzDecompress(&(state->stream));