MSVC pecadillos
modified: p_lx_elf.cpp modified: pefile.cpp
This commit is contained in:
+1
-1
@@ -3843,7 +3843,7 @@ PackLinuxElf64::check_pt_dynamic(Elf64_Phdr const *const phdr)
|
||||
{
|
||||
upx_uint64_t t = get_te64(&phdr->p_offset), s = sizeof(Elf64_Dyn) + t;
|
||||
upx_uint64_t filesz = get_te64(&phdr->p_filesz), memsz = get_te64(&phdr->p_memsz);
|
||||
if (s < t || (uint64_t)file_size < s
|
||||
if (s < t || (upx_uint64_t)file_size < s
|
||||
|| (7 & t) || (0xf & (filesz | memsz)) // .balign 8; 16==sizeof(Elf64_Dyn)
|
||||
|| filesz < sizeof(Elf64_Dyn)
|
||||
|| memsz < sizeof(Elf64_Dyn)
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ int PeFile::readFileHeader()
|
||||
: (h.p512*512+h.m512 - h.m512 ? 512 : 0);
|
||||
|
||||
if ((pe_offset + delta) < delta // wrap-around
|
||||
|| (pe_offset + delta) > file_size) {
|
||||
|| (pe_offset + delta) > (unsigned)file_size) {
|
||||
char buf[64]; snprintf(buf, sizeof(buf),
|
||||
"bad PE delta %#x at offset %#x", delta, pe_offset);
|
||||
throwCantPack(buf);
|
||||
|
||||
Reference in New Issue
Block a user