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:
+1
-1
@@ -481,7 +481,7 @@ unsigned PackUnix::unpackExtent(unsigned wanted, OutputFile *fo,
|
|||||||
int const sz_cpr = ph.c_len = get_te32(&hdr.sz_cpr);
|
int const sz_cpr = ph.c_len = get_te32(&hdr.sz_cpr);
|
||||||
ph.filter_cto = hdr.b_cto8;
|
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");
|
throwCantUnpack("corrupt b_info");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user