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

c++-analyzer needs improved range tracking.

modified:   p_lx_elf.cpp
This commit is contained in:
John Reiser 2016-10-09 09:33:35 -07:00
parent 0cd1ef0c7a
commit ca2293f6d3

View File

@ -1438,7 +1438,7 @@ bool PackLinuxElf32::canPack()
load_va = get_te32(&phdr->p_vaddr);
unsigned file_offset = get_te32(&phdr->p_offset);
if (~page_mask & file_offset) {
if ((~page_mask & load_va) == file_offset) {
if ((~page_mask & (unsigned)load_va) == file_offset) {
throwCantPack("Go-language PT_LOAD: try hemfix.c, or try '--force-execve'");
// Fixing it inside upx fails because packExtent() reads original file.
}