The Fence object was writing a size_t into the binder buffer
in flatten, which changes size if the producer and consumer
are running in a 32-bit and a 64-bit process. Use a uint32_t
instead.
Change-Id: Ifed526513800ce27f9d605101cddd922292cca37
if (size < getFlattenedSize() || count < getFdCount()) {
return NO_MEMORY;
}
- FlattenableUtils::write(buffer, size, getFdCount());
+ FlattenableUtils::write(buffer, size, (uint32_t)getFdCount());
if (isValid()) {
*fds++ = mFenceFd;
count--;
return NO_MEMORY;
}
- size_t numFds;
+ uint32_t numFds;
FlattenableUtils::read(buffer, size, numFds);
if (numFds > 1) {