1
0
mirror of https://github.com/upx/upx synced 2025-10-05 19:20:23 +08:00

MSVC lacks stpcpy()

modified:   p_lx_elf.cpp
This commit is contained in:
John Reiser 2024-08-26 16:43:58 -07:00
parent 8065eebca3
commit 65c362efce

View File

@ -5919,7 +5919,9 @@ unsigned PackLinuxElf32::forward_Shdrs(OutputFile *fo, Elf32_Ehdr *const eho)
}
}
set_te32(&sh_out->sh_name, ptr_shstrings - (char *)mb_shstrings.getVoidPtr());
ptr_shstrings = 1+ stpcpy(ptr_shstrings, name); // past terminating '\0'
do { // stupid MSVC lacks stpcpy()
*ptr_shstrings++ = *name;
} while (*name++);
++sh_out; ++n_sh_out; // actually commit the fowarding
}
}