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

Allow Load Configuration directory > 256, with info().

https://github.com/upx/upx/issues/245
	modified:   pefile.cpp
This commit is contained in:
John Reiser 2019-01-26 07:49:57 -08:00
parent 716d203a78
commit 70ed2d0d03

View File

@ -1432,8 +1432,9 @@ void PeFile::processLoadConf(Interval *iv) // pass 1
soloadconf = get_le32(loadconf);
if (soloadconf == 0)
return;
if (soloadconf > 256)
throwCantPack("size of Load Configuration directory unexpected");
static int const MAX_SOLOADCONF = 256; // XXX FIXME: Why?
if (soloadconf > MAX_SOLOADCONF)
info("Load Configuration directory %d > %d", soloadconf, MAX_SOLOADCONF);
// if there were relocation entries referring to the load config table
// then we need them for the copy of the table too