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

is_bad_linker_command() ignores LC_REQ_DYLD

https://github.com/upx/upx/issues/606
	modified:   p_mach.cpp
This commit is contained in:
John Reiser 2022-10-06 10:15:10 -07:00 committed by Markus F.X.J. Oberhumer
parent 65707900bc
commit 1e8f1f49d0

View File

@ -187,6 +187,7 @@ static int is_bad_linker_command(
unsigned cmd, unsigned cmdsize,
unsigned headway, unsigned lc_seg, unsigned szAddr)
{
cmd &= ~LC_REQ_DYLD;
return !cmd // there is no LC_ cmd 0
|| sizeof(lc_cmd_size) <= cmd // beyond table of known sizes
|| !lc_cmd_size[cmd] // obsolete, or proper size not known to us