mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
Merge.
This commit is contained in:
commit
450d7e9ad4
|
@ -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