1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

Added test for alreadyPacked().

committer: mfx <mfx> 977426670 +0000
This commit is contained in:
Markus F.X.J. Oberhumer 2000-12-21 19:24:30 +00:00
parent a254e81ba9
commit facca7b891

View File

@ -123,6 +123,9 @@ int PackVmlinuzI386::uncompressKernel()
fi->seek(0, SEEK_SET);
fi->readx(obuf, file_size);
if (find_le32(obuf + setup_size, UPX_MIN(file_size - setup_size, 1024), UPX_MAGIC_LE32) >= 0)
throwAlreadyPacked();
// estimate gzip-uncompressed kernel size & alloc buffer
ibuf.alloc((file_size - setup_size) * 3);