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

Commit ed3d8638 authored by Hui Peng's avatar Hui Peng
Browse files

Add validation on sdp attrinutes in bta_dm_act.cc

Bug: 263958603
Test: atest bt_host_test_bta
Ignore-AOSP-First: security
Tag: #security
Change-Id: I2aaadea6ce65f5fce2c9a7a2d66ee704e2fd5949
parent 590aa47f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1210,7 +1210,9 @@ static void store_avrcp_profile_feature(tSDP_DISC_REC* sdp_rec) {
  tSDP_DISC_ATTR* p_attr =
      get_legacy_stack_sdp_api()->record.SDP_FindAttributeInRec(
          sdp_rec, ATTR_ID_SUPPORTED_FEATURES);
  if (p_attr == NULL) {
  if (p_attr == NULL ||
      SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) != UINT_DESC_TYPE ||
      SDP_DISC_ATTR_LEN(p_attr->attr_len_type) < 2) {
    return;
  }