mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
Added a check for unsupported coff headers.
committer: mfx <mfx> 1035473178 +0000
This commit is contained in:
parent
204f4eefd8
commit
8744f6bd7f
|
|
@ -271,6 +271,8 @@ void PackDjgpp2::pack(OutputFile *fo)
|
|||
const unsigned hdrsize = 20 + 28 + (40 * coff_hdr.f_nscns);
|
||||
if (hdrsize < sizeof(coff_hdr) || hdrsize > tpos)
|
||||
throwCantPack("coff header error");
|
||||
if (hdrsize > (tpos & 0x1ff))
|
||||
throwCantPack("unsupported coff header");
|
||||
|
||||
ibuf.alloc(usize);
|
||||
obuf.allocForCompression(usize);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user