aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorladderbreaker <ladderbreaker@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-04-03 01:18:18 +0000
committerladderbreaker <ladderbreaker@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-04-03 01:18:18 +0000
commite2abee6b014ac0a02063ae82a42af000a7222cef (patch)
treec63191d1c26d1e5b9073be868a774182905badba /src/common
parentIssue 146 - reviewer Waylonis (diff)
downloadbreakpad-e2abee6b014ac0a02063ae82a42af000a7222cef.tar.xz
Issue 147 - reviewer Waylonis
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@138 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common')
-rw-r--r--src/common/mac/macho_walker.cc3
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;