lzma/gzip: fix potential oops when input data is truncated