mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-03-14 21:16:28 +00:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user