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

Commit 4055084d authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] Make sure server response doesn't exceed maximum allowable length...

[automerger] Make sure server response doesn't exceed maximum allowable length am: 8b69bbea am: 40f6edd1 am: ea75c5b6 am: d0656a11 am: aee29ac6

Change-Id: I414976f5e70e7a64aca72886f957b8f0dc04e7e1
parents 3a736ff1 aee29ac6
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1622,7 +1622,12 @@ static void gattServerSendResponseNative (JNIEnv *env, jobject object,

    if (val != NULL)
    {
        if (env->GetArrayLength(val) < BTGATT_MAX_ATTR_LEN) {
            response.attr_value.len = (uint16_t)env->GetArrayLength(val);
        } else {
            android_errorWriteLog(0x534e4554, "78787521");
            response.attr_value.len = BTGATT_MAX_ATTR_LEN;
        }
        jbyte* array = env->GetByteArrayElements(val, 0);

        for (int i = 0; i != response.attr_value.len; ++i)