Align hatch_off.

modified:   p_lx_elf.cpp
This commit is contained in:
John Reiser 2017-10-20 17:23:55 -07:00
parent c652626a37
commit 38c8b84a26

View File

@ -1638,7 +1638,7 @@ bool PackLinuxElf32::canPack()
throwCantPack("first PT_LOAD.p_offset != 0; try '--force-execve'");
return false;
}
hatch_off = get_te32(&phdr->p_memsz);
hatch_off = ~3u & (3+ get_te32(&phdr->p_memsz));
}
if (phdr->PT_NOTE == p_type) {
unsigned const x = get_te32(&phdr->p_memsz);
@ -1841,7 +1841,7 @@ PackLinuxElf64::canPack()
throwCantPack("first PT_LOAD.p_offset != 0; try '--force-execve'");
return false;
}
hatch_off = get_te64(&phdr->p_memsz);
hatch_off = ~3ul & (3+ get_te64(&phdr->p_memsz));
break;
}
}