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

initLoader() 4th parameter allows larger output size

modified:   packer.cpp
	modified:   packer.h
This commit is contained in:
John Reiser 2023-01-05 15:28:12 -08:00 committed by Markus F.X.J. Oberhumer
parent 99575e1010
commit 39442e6282
2 changed files with 3 additions and 3 deletions

View File

@ -1011,11 +1011,11 @@ static const char *getIdentstr(unsigned *size, int small) {
}
}
void Packer::initLoader(const void *pdata, int plen, int small) {
void Packer::initLoader(const void *pdata, int plen, int small, int pextra) {
delete linker;
linker = newLinker();
assert(bele == linker->bele);
linker->init(pdata, plen);
linker->init(pdata, plen, pextra);
unsigned size;
char const *const ident = getIdentstr(&size, small);

View File

@ -212,7 +212,7 @@ protected:
// loader util for linker
virtual upx_byte *getLoader() const;
virtual int getLoaderSize() const;
virtual void initLoader(const void *pdata, int plen, int small = -1);
virtual void initLoader(const void *pdata, int plen, int small = -1, int pextra = 0);
#define C const char *
void addLoader(C);
void addLoader(C, C);