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

Commit 455a3992 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [12820899, 12820921, 12820267, 12820924, 12820699,...

Merge cherrypicks of [12820899, 12820921, 12820267, 12820924, 12820699, 12820781, 12821235, 12821236, 12820925, 12821237, 12820545, 12821039, 12820926, 12820927, 12820928, 12820929, 12820930, 12820590, 12820471, 12820591, 12820592, 12820593, 12820594, 12821255, 12821256, 12821257, 12820998, 12820932, 12821258, 12820546, 12820933, 12820934, 12820547, 12820548, 12821275, 12821238, 12821239, 12821240, 12821241, 12821199, 12821276, 12821277, 12821278, 12821279, 12821280] into rvc-qpr1-release

Change-Id: I0ae5e959759bf2738be75612c08acef561e6d38a
parents ef0f21ab d3dc486b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -118,9 +118,11 @@ void sdp_server_handle_client_req(tCONN_CB* p_ccb, BT_HDR* p_msg) {

  if (p_req + sizeof(pdu_id) + sizeof(trans_num) > p_req_end) {
    android_errorWriteLog(0x534e4554, "69384124");
    android_errorWriteLog(0x534e4554, "169342531");
    trans_num = 0;
    sdpu_build_n_send_error(p_ccb, trans_num, SDP_INVALID_REQ_SYNTAX,
                            SDP_TEXT_BAD_HEADER);
    return;
  }

  /* The first byte in the message is the pdu type */
@@ -131,8 +133,10 @@ void sdp_server_handle_client_req(tCONN_CB* p_ccb, BT_HDR* p_msg) {

  if (p_req + sizeof(param_len) > p_req_end) {
    android_errorWriteLog(0x534e4554, "69384124");
    android_errorWriteLog(0x534e4554, "169342531");
    sdpu_build_n_send_error(p_ccb, trans_num, SDP_INVALID_REQ_SYNTAX,
                            SDP_TEXT_BAD_HEADER);
    return;
  }

  BE_STREAM_TO_UINT16(param_len, p_req);
+11 −1
Original line number Diff line number Diff line
@@ -1254,7 +1254,17 @@ void smp_key_distribution(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
    /* state check to prevent re-entrant */
    if (smp_get_state() == SMP_STATE_BOND_PENDING) {
      if (p_cb->derive_lk) {
        tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(p_cb->pairing_bda);
        if (!(p_dev_rec->sec_flags & BTM_SEC_LE_LINK_KEY_AUTHED) &&
            (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_AUTHED)) {
          SMP_TRACE_DEBUG(
              "%s BR key is higher security than existing LE keys, don't "
              "derive LK from LTK",
              __func__);
          android_errorWriteLog(0x534e4554, "158854097");
        } else {
          smp_derive_link_key_from_long_term_key(p_cb, NULL);
        }
        p_cb->derive_lk = false;
      }