Loading system/stack/sdp/sdp_utils.cc +11 −6 Original line number Diff line number Diff line Loading @@ -96,13 +96,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 Loading Loading
system/stack/sdp/sdp_utils.cc +11 −6 Original line number Diff line number Diff line Loading @@ -96,13 +96,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 Loading