diff options
author | Narayan Kamath <narayan@google.com> | 2014-10-09 19:17:44 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-09 19:17:44 +0000 |
commit | 16410d458fdf9915dc8cb82b1bae3949a8100124 (patch) | |
tree | b268688657aaff5eb6b89f78a09ec8b7480d03f8 /libs | |
parent | b7702c5ce7f010fa5f19646fd79f28ff04e7014b (diff) | |
parent | 9ea09757fa63ad2a9bea9c846b51c1210d69c79f (diff) | |
download | frameworks_native-16410d458fdf9915dc8cb82b1bae3949a8100124.zip frameworks_native-16410d458fdf9915dc8cb82b1bae3949a8100124.tar.gz frameworks_native-16410d458fdf9915dc8cb82b1bae3949a8100124.tar.bz2 |
am 9ea09757: Fix broken error check in Parcel::readBlob
* commit '9ea09757fa63ad2a9bea9c846b51c1210d69c79f':
Fix broken error check in Parcel::readBlob
Diffstat (limited to 'libs')
-rw-r--r-- | libs/binder/Parcel.cpp | 2 |
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; |