1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00
This commit is contained in:
Markus F.X.J. Oberhumer 2007-04-25 16:42:41 +02:00
commit 450d7e9ad4

View File

@ -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)