+1
−1
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Parcel::writeFileDescriptor should be creating a binder_fd_object and serializing it for submission to the binder driver. However the common Parcel::writeObject function takes a flat_binder_object as an argument, so writeFileDescriptor creates a flat_binder_object and uses the memory locations equivalent to the correct fields in binder_fd_object. That works, but in the process the flags field of the object is populated with FLAT_BINDER_FLAG_* values, which is incorrect for an object type of BINDER_TYPE_FD. The binder driver does not attempt to check that the flags field is populated only with valid flag bits (and this would be pretty difficult, since valid flag values overlap between the two types), but it also does not do anything with these invalid flags. So here we remove them. Test: Cuttlefish boots successfuly Change-Id: I1ba07855976097f7b99ea78526c933df42be68ba