don't crash in Parcel when given a null (and therfore invalid) native_handle_t
This commit is contained in:
parent
cf81c84e43
commit
1d0a95b12a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue