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

Added updateCallbackSizes().

committer: mfx <mfx> 976882889 +0000
This commit is contained in:
Markus F.X.J. Oberhumer 2000-12-15 12:21:29 +00:00
parent 566e6ba977
commit 4257e0e9ba
2 changed files with 5 additions and 1 deletions

View File

@ -227,11 +227,13 @@ protected:
int patchVersion(void *b, int blen);
void checkPatch(void *b, int blen, int boff, int size);
protected:
// relocation util
virtual upx_byte *optimizeReloc32(upx_byte *in,unsigned relocnum,upx_byte *out,upx_byte *image,int bs,int *big);
virtual unsigned unoptimizeReloc32(upx_byte **in,upx_byte *image,MemBuffer *out,int bs);
// UI util
virtual void updateCallbackSizes(unsigned *, unsigned *) const { }
protected:
InputFile *fi;

View File

@ -356,6 +356,8 @@ void UiPacker::doCallback(unsigned isize, unsigned osize)
if (s->pass < 0) // no callback wanted
return;
p->updateCallbackSizes(&isize, &osize);
if (s->u_len == 0 || isize > s->u_len)
return;
// check if we should update the display