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

Commit 8f268406 authored by Stanley Tng's avatar Stanley Tng Committed by android-build-merger
Browse files

Fix the LE CoC SL4A Test failure due to length check

am: 8635697a

Change-Id: I06461df508cd8f0246b2673db2c1810aab3c9322
parents ad4b2338 8635697a
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -843,6 +843,8 @@ void l2c_lcc_proc_pdu(tL2C_CCB* p_ccb, BT_HDR* p_buf) {
      return;
      return;
    }
    }


    p_buf->len -= sizeof(sdu_length);

    if (sdu_length < p_buf->len) {
    if (sdu_length < p_buf->len) {
      L2CAP_TRACE_ERROR("%s: Invalid sdu_length: %d", __func__, sdu_length);
      L2CAP_TRACE_ERROR("%s: Invalid sdu_length: %d", __func__, sdu_length);
      android_errorWriteWithInfoLog(0x534e4554, "112321180", -1, NULL, 0);
      android_errorWriteWithInfoLog(0x534e4554, "112321180", -1, NULL, 0);
@@ -861,7 +863,6 @@ void l2c_lcc_proc_pdu(tL2C_CCB* p_ccb, BT_HDR* p_buf) {
    p_data->len = 0;
    p_data->len = 0;
    p_ccb->ble_sdu_length = sdu_length;
    p_ccb->ble_sdu_length = sdu_length;
    L2CAP_TRACE_DEBUG("%s SDU Length = %d", __func__, sdu_length);
    L2CAP_TRACE_DEBUG("%s SDU Length = %d", __func__, sdu_length);
    p_buf->len -= sizeof(sdu_length);
    p_buf->offset += sizeof(sdu_length);
    p_buf->offset += sizeof(sdu_length);
    p_data->offset = 0;
    p_data->offset = 0;