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

fix issue 486

This commit is contained in:
goushibee 2021-04-07 15:40:13 +08:00 committed by Markus F.X.J. Oberhumer
parent 3a6f688265
commit bf957f435e

View File

@ -1552,6 +1552,9 @@ int PackMachBase<T>::canUnpack()
if (2048 < headway) {
infoWarning("Mach_header.sizeofcmds(%d) > 2048", headway);
}
if(!headway){
throwCantPack("Mach_header.sizeofcmds == 0");
}
rawmseg_buf.alloc(mhdri.sizeofcmds);
rawmseg = (Mach_segment_command *)rawmseg_buf.getVoidPtr();
fi->readx(rawmseg, mhdri.sizeofcmds);