Skip to content

Commit

Permalink
Do not include the trailing NULL from the C-String in the SDP service…
Browse files Browse the repository at this point in the history
… name

Change-Id: Ia9e589cafda38705ea1e1a163665d157748661b1
  • Loading branch information
Timm Korte authored and intervigilium committed May 5, 2017
1 parent 85d4e42 commit 0ebf465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion btif/src/btif_sock_sdp.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static bool create_base_record(const uint32_t sdp_handle, const char *name,
if (name[0] != '\0') { if (name[0] != '\0') {
stage = "service_name"; stage = "service_name";
if (!SDP_AddAttribute(sdp_handle, ATTR_ID_SERVICE_NAME, if (!SDP_AddAttribute(sdp_handle, ATTR_ID_SERVICE_NAME,
TEXT_STR_DESC_TYPE, (uint32_t)(strlen(name) + 1), TEXT_STR_DESC_TYPE, (uint32_t)(strlen(name)),
(uint8_t *)name)) (uint8_t *)name))
goto error; goto error;
} }
Expand Down

0 comments on commit 0ebf465

Please sign in to comment.