summaryrefslogtreecommitdiffstats
path: root/libs/binder
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-07-31 16:12:13 -0700
committerMathias Agopian <mathias@google.com>2009-07-31 16:18:16 -0700
commitf1db4aec6569d7cf9e1fb84f1d9c1292032eac30 (patch)
treeb04465a44e9363c1bfd1f7195eedbe9a6b0a43db /libs/binder
parentabac01052c1c40f8582fe9f010c2efe6013e25c6 (diff)
downloadframeworks_base-f1db4aec6569d7cf9e1fb84f1d9c1292032eac30.zip
frameworks_base-f1db4aec6569d7cf9e1fb84f1d9c1292032eac30.tar.gz
frameworks_base-f1db4aec6569d7cf9e1fb84f1d9c1292032eac30.tar.bz2
don't crash in Parcel when given a null (and therfore invalid) native_handle_t
Diffstat (limited to 'libs/binder')
-rw-r--r--libs/binder/Parcel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index f40e4bd..785a3c5 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -661,7 +661,7 @@ status_t Parcel::writeWeakBinder(const wp<IBinder>& val)
status_t Parcel::writeNativeHandle(const native_handle* handle)
{
- if (handle->version != sizeof(native_handle))
+ if (!handle || handle->version != sizeof(native_handle))
return BAD_TYPE;
status_t err;