mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
g++ -Wsign-compare is not as picky as MSVC warning C4018: '<': signed/unsigned mismatch
https://github.com/upx/upx/issues/247 modified: p_lx_elf.cpp
This commit is contained in:
parent
d60fef753f
commit
3c2bfc742e
|
@ -4717,7 +4717,7 @@ PackLinuxElf32::check_pt_dynamic(Elf32_Phdr const *const phdr)
|
|||
unsigned vaddr = get_te32(&phdr->p_vaddr);
|
||||
unsigned filesz = get_te32(&phdr->p_filesz), memsz = get_te32(&phdr->p_memsz);
|
||||
unsigned align = get_te32(&phdr->p_align);
|
||||
if (s < t || file_size < (u32_t)s
|
||||
if (s < t || (u32_t)file_size < s
|
||||
|| (3 & t) || (7 & (filesz | memsz)) // .balign 4; 8==sizeof(Elf32_Dyn)
|
||||
|| (-1+ align) & (t ^ vaddr)
|
||||
|| filesz < sizeof(Elf32_Dyn)
|
||||
|
|
Loading…
Reference in New Issue
Block a user