summaryrefslogtreecommitdiffstats
path: root/stack/sdp/sdp_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'stack/sdp/sdp_utils.c')
-rw-r--r--stack/sdp/sdp_utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/stack/sdp/sdp_utils.c b/stack/sdp/sdp_utils.c
index 5c8d73312..d9b1ea7ef 100644
--- a/stack/sdp/sdp_utils.c
+++ b/stack/sdp/sdp_utils.c
@@ -1027,6 +1027,11 @@ UINT8 *sdpu_build_partial_attrib_entry (UINT8 *p_out, tSDP_ATTRIBUTE *p_attr, UI
sdpu_build_attrib_entry(p_tmp_attr, p_attr);
attr_len = sdpu_get_attrib_entry_len(p_attr);
+ if (len > SDP_MAX_ATTR_LEN)
+ {
+ SDP_TRACE_ERROR("sdpu_build_partial_attrib_entry len %d exceeds SDP_MAX_ATTR_LEN",len);
+ len = SDP_MAX_ATTR_LEN;
+ }
len_to_copy = ((attr_len - *offset) < len) ? (attr_len - *offset): len;
if(p_out)
{