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

Commit 2b515cef authored by Elliott Hughes's avatar Elliott Hughes Committed by Gerrit Code Review
Browse files

Merge "Native crash SIGSEGV bad ptr from /system/lib/libdvm.so"

parents fe0ec4b6 d4b9486c
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -954,6 +954,11 @@ static void gattClientWriteCharacteristicNative(JNIEnv* env, jobject object,
{
{
    if (!sGattIf) return;
    if (!sGattIf) return;


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

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