mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
allow unpack of incompressible extents, such as
http://www.equi4.com/pub/tk/8.4.13/tclkit-linux-x86.gz
This commit is contained in:
parent
84dedb73a5
commit
6934bdd533
|
@ -697,7 +697,7 @@ bool Packer::getPackHeader(void *b, int blen)
|
||||||
if (!testUnpackVersion(ph.version))
|
if (!testUnpackVersion(ph.version))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (ph.c_len >= ph.u_len || (off_t)ph.c_len >= file_size
|
if (ph.c_len > ph.u_len || (off_t)ph.c_len >= file_size
|
||||||
|| ph.version <= 0 || ph.version >= 0xff)
|
|| ph.version <= 0 || ph.version >= 0xff)
|
||||||
throwCantUnpack("header corrupted");
|
throwCantUnpack("header corrupted");
|
||||||
else if ((off_t)ph.u_len > ph.u_file_size)
|
else if ((off_t)ph.u_len > ph.u_file_size)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user