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

Commit eec41c20 authored by Pawan Wagh's avatar Pawan Wagh Committed by Gerrit Code Review
Browse files

Merge "Check for null data buffer in AParcel_marshal"

parents b621667c 0beb9569
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -700,6 +700,9 @@ binder_status_t AParcel_marshal(const AParcel* parcel, uint8_t* buffer, size_t s
        return STATUS_BAD_VALUE;
    }
    const uint8_t* internalBuffer = parcel->get()->data();
    if (internalBuffer == nullptr) {
        return STATUS_UNEXPECTED_NULL;
    }
    memcpy(buffer, internalBuffer + start, len);
    return STATUS_OK;
}