commit | 1d0a95b12a9194f64dd436224ec3bf8e0622d678 | [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 | bbc967726cbe12bd9e3e193df480941de5b38734 | |
parent | cf81c84e43eb33931b950fa2c9b4c6f51afe7197 [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;