From 1e8f1f49d0b7734b1417f64d0b439786bbe2a07c Mon Sep 17 00:00:00 2001 From: John Reiser Date: Thu, 6 Oct 2022 10:15:10 -0700 Subject: [PATCH] is_bad_linker_command() ignores LC_REQ_DYLD https://github.com/upx/upx/issues/606 modified: p_mach.cpp --- src/p_mach.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p_mach.cpp b/src/p_mach.cpp index bb7dbf70..6eb0daa6 100644 --- a/src/p_mach.cpp +++ b/src/p_mach.cpp @@ -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