Parcel marshall error explain objects

A kernel binder object for libbinder can either be a binder object
or an FD.

Bug: N/A (from email thread)
Test: N/A
Change-Id: Iaa02595c5859879749f776222eccca52e782cbfb
This commit is contained in:
Steven Moreland
2022-07-07 16:45:18 +00:00
parent c6350a111b
commit 7a2f642bae

View File

@@ -549,10 +549,10 @@ static jbyteArray android_os_Parcel_marshall(JNIEnv* env, jclass clazz, jlong na
return NULL;
}
// do not marshall if there are binder objects in the parcel
if (parcel->objectsCount())
{
jniThrowException(env, "java/lang/RuntimeException", "Tried to marshall a Parcel that contained Binder objects.");
jniThrowException(env, "java/lang/RuntimeException",
"Tried to marshall a Parcel that contains objects (binders or FDs).");
return NULL;
}