diff options
| author | 2022-07-07 16:50:54 +0000 | |
|---|---|---|
| committer | 2022-07-07 16:52:47 +0000 | |
| commit | aa7b525204b537a58b6ba5f611d242850c7adf8a (patch) | |
| tree | dcd186f708ad5eceb20e10988022dc2568db08f2 | |
| parent | 7a2f642bae27f940b7a68753c3fbad700af2267f (diff) | |
Parcel marshall - disallow RPC Parcels
RPC Parcels need to be interpreted in the context of an RPC session.
Otherwise, they don't make sense.
Bug: N/A
Test: N/A
Change-Id: I7a7b83341372faae357927f1b23be181b2f907af
| -rw-r--r-- | core/jni/android_os_Parcel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/jni/android_os_Parcel.cpp b/core/jni/android_os_Parcel.cpp index acadac78ce13..bb4ab39a59d1 100644 --- a/core/jni/android_os_Parcel.cpp +++ b/core/jni/android_os_Parcel.cpp @@ -549,6 +549,11 @@ static jbyteArray android_os_Parcel_marshall(JNIEnv* env, jclass clazz, jlong na return NULL; } + if (parcel->isForRpc()) { + jniThrowException(env, "java/lang/RuntimeException", "Tried to marshall an RPC Parcel."); + return NULL; + } + if (parcel->objectsCount()) { jniThrowException(env, "java/lang/RuntimeException", |