mirror of
https://github.com/upx/upx
synced 2025-10-05 19:20:23 +08:00
Removed Packer::patchVersion() and Packer::patchVersionYear().
This commit is contained in:
parent
6f1cc2c1e5
commit
9f20ddc800
|
@ -633,11 +633,6 @@ void PackTos::pack(OutputFile *fo)
|
|||
memcpy(obuf+d_off, getLoader() + e_len, d_len);
|
||||
|
||||
patchPackHeader(loader, o_text);
|
||||
#if 0
|
||||
patchVersionYear(loader, o_text);
|
||||
if (!opt->small)
|
||||
patchVersion(loader, o_text);
|
||||
#endif
|
||||
|
||||
// write new file header, loader and compressed file
|
||||
fo->write(&oh, FH_SIZE);
|
||||
|
|
|
@ -828,38 +828,6 @@ int Packer::patch_le32(void *b, int blen, const void *old, unsigned new_)
|
|||
}
|
||||
|
||||
|
||||
// patch version into stub/ident_n.ash
|
||||
int Packer::patchVersion(void *b, int blen)
|
||||
{
|
||||
int boff = find(b, blen, "$Id: UPX UPXV ", 14);
|
||||
checkPatch(b, blen, boff, 14);
|
||||
|
||||
unsigned char *p = (unsigned char *)b + boff + 9;
|
||||
if (opt->debug.fake_stub_version[0])
|
||||
memcpy(p, opt->debug.fake_stub_version, 4);
|
||||
else
|
||||
memcpy(p, UPX_VERSION_STRING4, 4);
|
||||
|
||||
return boff;
|
||||
}
|
||||
|
||||
|
||||
// patch year into stub/ident_[ns].ash
|
||||
int Packer::patchVersionYear(void *b, int blen)
|
||||
{
|
||||
int boff = find(b, blen, " 1996-UPXY ", 11);
|
||||
checkPatch(b, blen, boff, 11);
|
||||
|
||||
unsigned char *p = (unsigned char *)b + boff + 6;
|
||||
if (opt->debug.fake_stub_year[0])
|
||||
memcpy(p, opt->debug.fake_stub_year, 4);
|
||||
else
|
||||
memcpy(p, UPX_VERSION_YEAR, 4);
|
||||
|
||||
return boff;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// relocation util
|
||||
**************************************************************************/
|
||||
|
|
|
@ -258,8 +258,6 @@ protected:
|
|||
int patch_le16(void *b, int blen, const void * old, unsigned new_);
|
||||
int patch_le32(void *b, int blen, unsigned old, unsigned new_);
|
||||
int patch_le32(void *b, int blen, const void * old, unsigned new_);
|
||||
int patchVersion(void *b, int blen);
|
||||
int patchVersionYear(void *b, int blen);
|
||||
void checkPatch(void *b, int blen, int boff, int size);
|
||||
|
||||
// relocation util
|
||||
|
|
Loading…
Reference in New Issue
Block a user