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

Commit 2c41d997 authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

am 3987efa9: Merge "LE: Fix stack crash on invalid descriptor write request" into klp-dev

* commit '3987efa9':
  LE: Fix stack crash on invalid descriptor write request
parents e56c70f6 3987efa9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -991,6 +991,11 @@ static void gattClientWriteDescriptorNative(JNIEnv* env, jobject object,
{
    if (!sGattIf) return;

    if (value == NULL) {
        warn("gattClientWriteDescriptorNative() ignoring NULL array");
        return;
    }

    btgatt_srvc_id_t srvc_id;
    srvc_id.id.inst_id = (uint8_t) service_id_inst_id;
    srvc_id.is_primary = (service_type == BTGATT_SERVICE_TYPE_PRIMARY ? 1 : 0);