commit | f1db4aec6569d7cf9e1fb84f1d9c1292032eac30 | [log] [tgz] |
---|---|---|
author | Mathias Agopian <mathias@google.com> | Fri Jul 31 16:12:13 2009 -0700 |
committer | Mathias Agopian <mathias@google.com> | Fri Jul 31 16:18:16 2009 -0700 |
tree | b04465a44e9363c1bfd1f7195eedbe9a6b0a43db | |
parent | abac01052c1c40f8582fe9f010c2efe6013e25c6 [diff] [blame] |
don't crash in Parcel when given a null (and therfore invalid) native_handle_t
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::writeNativeHandle(const native_handle* handle) { - if (handle->version != sizeof(native_handle)) + if (!handle || handle->version != sizeof(native_handle)) return BAD_TYPE; status_t err;