diff options
author | nealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-02-22 01:31:43 +0000 |
---|---|---|
committer | nealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-02-22 01:31:43 +0000 |
commit | cadc8ddde91cd82aa74375abb45417c75662e9b7 (patch) | |
tree | 0d23cc26c692f21dfaa9db243a9d2033e8e7075c /src/common/linux/file_id.cc | |
parent | Modify symbol supplier interface to support an overload that takes a symbol d... (diff) | |
download | breakpad-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.cc | 2 |
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; } |