1
0
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:
John Reiser
2024-05-04 09:40:51 -07:00
parent 811f66de84
commit a831a20910

View File

@ -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;
}