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

Added two checks for throwCantPackExact.

This commit is contained in:
Markus F.X.J. Oberhumer 2006-11-21 18:01:16 +01:00
parent 16163bf20b
commit 5d71e69941
2 changed files with 6 additions and 0 deletions

View File

@ -248,6 +248,9 @@ unsigned optimize_relocs(upx_byte *b, const unsigned size,
const upx_byte *relocs, const unsigned nrelocs,
upx_byte *crel, bool *has_9a)
{
if (opt->exact)
throwCantPackExact();
upx_byte * const crel_save = crel;
unsigned i;
unsigned seg_high = 0;

View File

@ -871,6 +871,9 @@ upx_byte *Packer::optimizeReloc32(upx_byte *in, unsigned relocnum,
upx_byte *out, upx_byte *image,
int bswap, int *big)
{
if (opt->exact)
throwCantPackExact();
*big = 0;
if (relocnum == 0)
return out;