summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-10-10 17:00:18 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-10 17:00:18 +0000
commit328f9c259ba9d3586a2496d887a96b610d112b7b (patch)
tree3b71480bf3221977efbfcf228b0d3fd48e992191 /libs
parent20fca75fbd9141ebae6c9a28f5c09a837eb9caad (diff)
parent16410d458fdf9915dc8cb82b1bae3949a8100124 (diff)
downloadframeworks_native-328f9c259ba9d3586a2496d887a96b610d112b7b.zip
frameworks_native-328f9c259ba9d3586a2496d887a96b610d112b7b.tar.gz
frameworks_native-328f9c259ba9d3586a2496d887a96b610d112b7b.tar.bz2
am 16410d45: am 9ea09757: Fix broken error check in Parcel::readBlob
* commit '16410d458fdf9915dc8cb82b1bae3949a8100124': Fix broken error check in Parcel::readBlob
Diffstat (limited to 'libs')
-rw-r--r--libs/binder/Parcel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index f61eaca..1dbb06f 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -1281,7 +1281,7 @@ status_t Parcel::readBlob(size_t len, ReadableBlob* outBlob) const
if (fd == int(BAD_TYPE)) return BAD_VALUE;
void* ptr = ::mmap(NULL, len, PROT_READ, MAP_SHARED, fd, 0);
- if (!ptr) return NO_MEMORY;
+ if (ptr == MAP_FAILED) return NO_MEMORY;
outBlob->init(true /*mapped*/, ptr, len);
return NO_ERROR;