aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/file_id.cc
diff options
context:
space:
mode:
authornealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-02-22 01:31:43 +0000
committernealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-02-22 01:31:43 +0000
commitcadc8ddde91cd82aa74375abb45417c75662e9b7 (patch)
tree0d23cc26c692f21dfaa9db243a9d2033e8e7075c /src/common/linux/file_id.cc
parentModify symbol supplier interface to support an overload that takes a symbol d... (diff)
downloadbreakpad-cadc8ddde91cd82aa74375abb45417c75662e9b7.tar.xz
Issue 294: mmap error checking is not correct.
R=Liu git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@312 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux/file_id.cc')
-rw-r--r--src/common/linux/file_id.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/linux/file_id.cc b/src/common/linux/file_id.cc
index d69d45a9..1adf2a13 100644
--- a/src/common/linux/file_id.cc
+++ b/src/common/linux/file_id.cc
@@ -101,7 +101,7 @@ bool FileID::ElfFileIdentifier(unsigned char identifier[16]) {
}
void *base = mmap(NULL, st.st_size,
PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
- if (!base) {
+ if (base == MAP_FAILED) {
close(fd);
return false;
}