Revert "Fix "Binder: Make sure binder objects do not overlap" to work old binder kernel interface"

This branch has the new driver interface so it should not have this change.

This reverts commit 6790329358.

Change-Id: I9b6d0d653d98dbdb521ef964c5e7c2f14859d340
This commit is contained in:
Arve Hjønnevåg 2014-02-19 20:42:13 -08:00
parent 9b5c3b9132
commit 6f286114ec

View File

@ -1340,7 +1340,7 @@ size_t Parcel::ipcObjectsCount() const
void Parcel::ipcSetDataReference(const uint8_t* data, size_t dataSize, void Parcel::ipcSetDataReference(const uint8_t* data, size_t dataSize,
const binder_size_t* objects, size_t objectsCount, release_func relFunc, void* relCookie) const binder_size_t* objects, size_t objectsCount, release_func relFunc, void* relCookie)
{ {
size_t minOffset = 0; binder_size_t minOffset = 0;
freeDataNoInit(); freeDataNoInit();
mError = NO_ERROR; mError = NO_ERROR;
mData = const_cast<uint8_t*>(data); mData = const_cast<uint8_t*>(data);
@ -1354,10 +1354,10 @@ void Parcel::ipcSetDataReference(const uint8_t* data, size_t dataSize,
mOwner = relFunc; mOwner = relFunc;
mOwnerCookie = relCookie; mOwnerCookie = relCookie;
for (size_t i = 0; i < mObjectsSize; i++) { for (size_t i = 0; i < mObjectsSize; i++) {
size_t offset = mObjects[i]; binder_size_t offset = mObjects[i];
if (offset < minOffset) { if (offset < minOffset) {
ALOGE("%s: bad object offset %zu < %zu\n", ALOGE("%s: bad object offset %"PRIu64" < %"PRIu64"\n",
__func__, offset, minOffset); __func__, (uint64_t)offset, (uint64_t)minOffset);
mObjectsSize = 0; mObjectsSize = 0;
break; break;
} }