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

Commit 909649d0 authored by Hui Peng's avatar Hui Peng Committed by Automerger Merge Worker
Browse files

Merge "Fix a NPD in sdpu_find_profile_version" into tm-dev am: 648f7433 am: b96e66eb

parents ceb4a6e0 b96e66eb
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -106,13 +106,18 @@ static std::vector<std::pair<uint16_t, uint16_t>> sdpu_find_profile_version(
        uint16_t uuid = p_ssattr->attr_value.v.u16;
        // Next attribute should be the version attribute
        tSDP_DISC_ATTR* version_attr = p_ssattr->p_next_attr;
        if (SDP_DISC_ATTR_TYPE(version_attr->attr_len_type) != UINT_DESC_TYPE ||
        if (version_attr == nullptr ||
            SDP_DISC_ATTR_TYPE(version_attr->attr_len_type) != UINT_DESC_TYPE ||
            SDP_DISC_ATTR_LEN(version_attr->attr_len_type) != 2) {
          if (version_attr == nullptr) {
            LOG(WARNING) << __func__ << ": version attr not found";
          } else {
            LOG(WARNING) << __func__ << ": Bad version type "
                         << loghex(
                                SDP_DISC_ATTR_TYPE(version_attr->attr_len_type))
                         << ", or length "
                         << SDP_DISC_ATTR_LEN(version_attr->attr_len_type);
          }
          return std::vector<std::pair<uint16_t, uint16_t>>();
        }
        // High order 8 bits is the major number, low order is the