diff options
author | Arve Hjønnevåg <arve@android.com> | 2014-02-20 00:52:13 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-02-20 00:52:13 +0000 |
commit | 9b5c3b9132831ba9078fc7c4001821bcfe8dd39d (patch) | |
tree | 118549d2ac4961ed044cad116ad53d5f91cb8856 /libs/binder/Parcel.cpp | |
parent | 7cc5b8800c22790b0db9ea0af62fcad2cc998303 (diff) | |
parent | d5a354c6b7f2ae0b93e018f3024a2fca5f6543a1 (diff) | |
download | frameworks_native-9b5c3b9132831ba9078fc7c4001821bcfe8dd39d.zip frameworks_native-9b5c3b9132831ba9078fc7c4001821bcfe8dd39d.tar.gz frameworks_native-9b5c3b9132831ba9078fc7c4001821bcfe8dd39d.tar.bz2 |
am d5a354c6: am d06f6b00: am 67903293: Fix "Binder: Make sure binder objects do not overlap" to work old binder kernel interface
* commit 'd5a354c6b7f2ae0b93e018f3024a2fca5f6543a1':
Fix "Binder: Make sure binder objects do not overlap" to work old binder kernel interface
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r-- | libs/binder/Parcel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 56e6d80..88e20e4 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -1340,7 +1340,7 @@ size_t Parcel::ipcObjectsCount() const void Parcel::ipcSetDataReference(const uint8_t* data, size_t dataSize, const binder_size_t* objects, size_t objectsCount, release_func relFunc, void* relCookie) { - binder_size_t minOffset = 0; + size_t minOffset = 0; freeDataNoInit(); mError = NO_ERROR; mData = const_cast<uint8_t*>(data); @@ -1354,10 +1354,10 @@ void Parcel::ipcSetDataReference(const uint8_t* data, size_t dataSize, mOwner = relFunc; mOwnerCookie = relCookie; for (size_t i = 0; i < mObjectsSize; i++) { - binder_size_t offset = mObjects[i]; + size_t offset = mObjects[i]; if (offset < minOffset) { - ALOGE("%s: bad object offset %"PRIu64" < %"PRIu64"\n", - __func__, (uint64_t)offset, (uint64_t)minOffset); + ALOGE("%s: bad object offset %zu < %zu\n", + __func__, offset, minOffset); mObjectsSize = 0; break; } |