mirror of https://github.com/upx/upx.git
Fixed a MemBuffer handling error.
committer: ml1050 <ml1050> 965602159 +0000
This commit is contained in:
parent
572dbee944
commit
cd67fc817e
|
@ -489,8 +489,8 @@ void Packer::copyOverlay(OutputFile *fo, unsigned overlay,
|
||||||
|
|
||||||
do {
|
do {
|
||||||
unsigned len = overlay < buf_size ? overlay : buf_size;
|
unsigned len = overlay < buf_size ? overlay : buf_size;
|
||||||
fi->readx(buf, len);
|
fi->readx(*buf, len);
|
||||||
fo->write(buf, len);
|
fo->write(*buf, len);
|
||||||
overlay -= len;
|
overlay -= len;
|
||||||
} while (overlay > 0);
|
} while (overlay > 0);
|
||||||
}
|
}
|
||||||
|
@ -800,7 +800,7 @@ unsigned Packer::unoptimizeReloc32(upx_byte **in, upx_byte *image,
|
||||||
}
|
}
|
||||||
//fprintf(stderr,"relocnum=%x\n",relocn);
|
//fprintf(stderr,"relocnum=%x\n",relocn);
|
||||||
out->alloc(4*relocn+4); // one extra data
|
out->alloc(4*relocn+4); // one extra data
|
||||||
LE32 *outp = (LE32*) (unsigned char *) out;
|
LE32 *outp = (LE32*) (unsigned char *) *out;
|
||||||
LE32 *relocs = outp;
|
LE32 *relocs = outp;
|
||||||
unsigned jc = (unsigned) -4;
|
unsigned jc = (unsigned) -4;
|
||||||
for (p = *in; *p; p++)
|
for (p = *in; *p; p++)
|
||||||
|
|
Loading…
Reference in New Issue