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

Fixed patch-length sizes.

committer: mfx <mfx> 976882947 +0000
This commit is contained in:
Markus F.X.J. Oberhumer 2000-12-15 12:22:27 +00:00
parent 4257e0e9ba
commit f3a52a7bff

View File

@ -757,7 +757,7 @@ int Packer::patch_le16(void *b, int blen, const void *old, unsigned new_)
int Packer::patch_le32(void *b, int blen, unsigned old, unsigned new_)
{
int boff = find_le32(b,blen,old);
checkPatch(b, blen, boff, 2);
checkPatch(b, blen, boff, 4);
unsigned char *p = (unsigned char *)b + boff;
set_le32(p,new_);
@ -769,7 +769,7 @@ int Packer::patch_le32(void *b, int blen, unsigned old, unsigned new_)
int Packer::patch_le32(void *b, int blen, const void *old, unsigned new_)
{
int boff = find(b,blen,old,4);
checkPatch(b, blen, boff, 2);
checkPatch(b, blen, boff, 4);
unsigned char *p = (unsigned char *)b + boff;
set_le32(p,new_);