aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-11-23 14:22:05 +0000
committerqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-11-23 14:22:05 +0000
commitbad70be095dd93ecc9c28bab90bed0c86fbdedca (patch)
tree6f6a1ac9584f998128dbe5f0e4a4bbc254fb788b /src/common/mac
parentRename md5.c to md5.cc, put its contents inside the google_breakpad namespace. (diff)
downloadbreakpad-bad70be095dd93ecc9c28bab90bed0c86fbdedca.tar.xz
Correct compilation warning.
1) Modify src/common/mac/macho_walker.cc to remove a signed vs unsigned comparison. 2) Replace mktemp in test using AutoTmpDir that has been moved from client/mac/tests to common/tests. Review URL: http://breakpad.appspot.com/328001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@888 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/mac')
-rw-r--r--src/common/mac/macho_walker.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/mac/macho_walker.cc b/src/common/mac/macho_walker.cc
index 26535bc2..92da7b1f 100644
--- a/src/common/mac/macho_walker.cc
+++ b/src/common/mac/macho_walker.cc
@@ -105,9 +105,11 @@ bool MachoWalker::WalkHeader(int cpu_type) {
bool MachoWalker::ReadBytes(void *buffer, size_t size, off_t offset) {
if (memory_) {
+ if (offset < 0)
+ return false;
bool result = true;
if (offset + size > memory_size_) {
- if (offset >= memory_size_)
+ if (static_cast<size_t>(offset) >= memory_size_)
return false;
size = memory_size_ - offset;
result = false;