From e2abee6b014ac0a02063ae82a42af000a7222cef Mon Sep 17 00:00:00 2001 From: ladderbreaker Date: Tue, 3 Apr 2007 01:18:18 +0000 Subject: Issue 147 - reviewer Waylonis git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@138 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/mac/macho_walker.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/common') 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; -- cgit v1.2.1