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

Appease MSVC warning C4018: s/igned/unsigned mismatch

modified:   p_lx_elf.cpp
This commit is contained in:
John Reiser 2018-08-13 18:47:42 -07:00
parent 90eb68b3b9
commit 8f9713ed53

View File

@ -3435,7 +3435,7 @@ int PackLinuxElf32::pack2(OutputFile *fo, Filter &ft)
}
x.offset = get_te32(&phdri[k].p_offset);
x.size = get_te32(&phdri[k].p_filesz);
if (!is_shlib || hdr_u_len < x.size) {
if (!is_shlib || (off_t)hdr_u_len < x.size) {
if (0 == nx) { // 1st PT_LOAD32 must cover Ehdr at 0==p_offset
unsigned const delta = hdr_u_len;
if (ft.id < 0x40) {
@ -3559,7 +3559,7 @@ int PackLinuxElf64::pack2(OutputFile *fo, Filter &ft)
}
x.offset = get_te64(&phdri[k].p_offset);
x.size = get_te64(&phdri[k].p_filesz);
if (!is_shlib || hdr_u_len < x.size) {
if (!is_shlib || (off_t)hdr_u_len < x.size) {
if (0 == nx) { // 1st PT_LOAD64 must cover Ehdr at 0==p_offset
unsigned const delta = hdr_u_len;
if (ft.id < 0x40) {