commit | aaac89e795ba44f151e4d883e6add97812d7d6ca | [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 | a8814368b8cccdf7a708f8bea14c344da3c2ea19 | |
parent | e2833f795fdcc616c4d46f53c4f4d5f1c51c847a [diff] |
don't crash in Parcel when given a null (and therfore invalid) native_handle_t
diff --git a/Parcel.cpp b/Parcel.cpp index f40e4bd..785a3c5 100644 --- a/Parcel.cpp +++ b/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;