all: canonicalize win32 and win64 file names

This commit is contained in:
Markus F.X.J. Oberhumer
2023-02-10 09:49:29 +01:00
parent b8d9c2b755
commit f584c91386
38 changed files with 1061 additions and 326 deletions
+2 -2
View File
@@ -190,8 +190,8 @@ bool PackHeader::decodePackHeaderFromBuf(SPAN_S(const upx_byte) buf, int blen) {
fprintf(stderr, " decodePackHeaderFromBuf version=%d format=%d method=%d level=%d\n",
version, format, method, level);
}
if (0 == format || 128 == format || (format < 128 && format > UPX_F_LINUX_ELF64_ARM) ||
(format > 128 && format > UPX_F_DYLIB_PPC64)) {
if (!((format >= 1 && format <= UPX_F_W64PE_ARM64EC) ||
(format >= 129 && format <= UPX_F_DYLIB_PPC64))) {
char msg[24];
snprintf(msg, sizeof(msg), "unknown format %d", format);
throwCantUnpack(msg);