diff --git a/src/p_unix.cpp b/src/p_unix.cpp index 86f9bc6a..5114b7aa 100644 --- a/src/p_unix.cpp +++ b/src/p_unix.cpp @@ -481,7 +481,7 @@ unsigned PackUnix::unpackExtent(unsigned wanted, OutputFile *fo, int const sz_cpr = ph.c_len = get_te32(&hdr.sz_cpr); ph.filter_cto = hdr.b_cto8; - if (sz_unc == 0) { // must never happen while 0!=wanted + if (sz_unc == 0 || M_LZMA < hdr.b_method) { throwCantUnpack("corrupt b_info"); break; }