mirror of
https://github.com/upx/upx.git
synced 2025-08-11 22:52:30 +08:00
unpackExtent detects corrupted compression method
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66338&q=label%3AProj-upx modified: p_unix.cpp
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user