fixed a nasty relocation handling error which could produce broken
compressed files committer: ml1050 <ml1050> 1126865811 +0000
This commit is contained in:
+3
-1
@@ -293,7 +293,9 @@ unsigned optimize_relocs(upx_byte *b, const unsigned size,
|
|||||||
{
|
{
|
||||||
addr = get_le32(relocs+4*i);
|
addr = get_le32(relocs+4*i);
|
||||||
//printf ("%x\n",es*16+di);
|
//printf ("%x\n",es*16+di);
|
||||||
if (addr - es*16 > 0xfffe)
|
if ((addr - es*16 > 0xfffe)
|
||||||
|
|| (i == nrelocs - 1 && addr - es * 16 > 0xff00)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// segment change
|
// segment change
|
||||||
t = 1+(0xffff-di)/254;
|
t = 1+(0xffff-di)/254;
|
||||||
|
|||||||
Reference in New Issue
Block a user