summaryrefslogtreecommitdiff
path: root/Parcel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Parcel.cpp')
-rw-r--r--Parcel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Parcel.cpp b/Parcel.cpp
index cfebeec..5aa8c77 100644
--- a/Parcel.cpp
+++ b/Parcel.cpp
@@ -1457,6 +1457,12 @@ status_t Parcel::readNullableNativeHandleNoDup(const native_handle_t **handle,
return status;
}
+ if (*handle == nullptr) {
+ // null handle already read above
+ ALOGE("Expecting non-null handle buffer");
+ return BAD_VALUE;
+ }
+
int numFds = (*handle)->numFds;
int numInts = (*handle)->numInts;