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

Add filename to infoWarning("file coruupted")

modified:   p_mach.cpp
This commit is contained in:
John Reiser 2022-06-01 08:34:23 -07:00 committed by Markus F.X.J. Oberhumer
parent 05976ee1a7
commit 3b4627e17e

View File

@ -1775,7 +1775,7 @@ int PackMachBase<T>::canUnpack()
}
}
if (395 == style) { // Desperation
infoWarning("file corrupted");
infoWarning("file corrupted: %s", fi->getName());
fi->seek(file_size - bufsize, SEEK_SET);
fi->readx(buf3, bufsize);
unsigned const *p = (unsigned const *)&buf3[bufsize];
@ -1868,7 +1868,7 @@ int PackMachBase<T>::canUnpack()
}
if ( overlay_offset < sz_mach_headers
|| (off_t)overlay_offset >= file_size) {
infoWarning("file corrupted");
infoWarning("file corrupted: %s", fi->getName());
MemBuffer buf2(umin(1<<14, file_size));
fi->seek(sz_mach_headers, SEEK_SET);
fi->readx(buf2, buf2.getSize());