Diff between dbaf48e31edd7022cf1e85cf08e8659420c6bc6d and ec17923aa6e1d2010100afbd06b950e287dd972b

Changed Files

File Additions Deletions Status
profiles/audio/avrcp.c +1 -1 modified

Full Patch

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 36e137f..98a0ea2 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -2093,7 +2093,7 @@ static void avrcp_parse_media_player_item(struct avrcp *session,
 	avrcp_player_parse_features(player, &operands[8]);
 
 	namelen = bt_get_be16(&operands[26]);
-	if (namelen > 0) {
+	if (namelen > 0 && namelen + 28 == len) {
 		namelen = MIN(namelen, sizeof(name) - 1);
 		memcpy(name, &operands[28], namelen);
 		name[namelen] = '\0';