summaryrefslogtreecommitdiffstats
path: root/libs/binder
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-10-09 12:50:12 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-09 12:50:12 +0000
commit4335d35c71e777d42fbe8d53fa6b8fbc95d4c2b7 (patch)
tree19b36ea9d82fed0346b1c38460803f3f1d8ef78b /libs/binder
parenta046f506a52aa8fd0fe193b18fe283da83107f09 (diff)
parent9ea09757fa63ad2a9bea9c846b51c1210d69c79f (diff)
downloadframeworks_native-4335d35c71e777d42fbe8d53fa6b8fbc95d4c2b7.zip
frameworks_native-4335d35c71e777d42fbe8d53fa6b8fbc95d4c2b7.tar.gz
frameworks_native-4335d35c71e777d42fbe8d53fa6b8fbc95d4c2b7.tar.bz2
am 9ea09757: Fix broken error check in Parcel::readBlob
* commit '9ea09757fa63ad2a9bea9c846b51c1210d69c79f': Fix broken error check in Parcel::readBlob
Diffstat (limited to 'libs/binder')
-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;