Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d0a95b1 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

don't crash in Parcel when given a null (and therfore invalid) native_handle_t

parent cf81c84e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;