diff options
-rw-r--r-- | src/common/mac/macho_walker.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/mac/macho_walker.cc b/src/common/mac/macho_walker.cc index c14d9eeb..cd66529d 100644 --- a/src/common/mac/macho_walker.cc +++ b/src/common/mac/macho_walker.cc @@ -130,6 +130,9 @@ bool MachoWalker::FindHeader(int cpu_type, off_t &offset) { if (!ReadBytes(&header_cpu_type, sizeof(header_cpu_type), offset)) return false; + if (magic == MH_CIGAM || magic == MH_CIGAM_64) + header_cpu_type = NXSwapInt(header_cpu_type); + if (valid_cpu_type != header_cpu_type) return false; |