Linux bluetooth development
 help / color / mirror / Atom feed
* [BlueZ] avrcp: Fix media/folder name not being set
@ 2026-08-17  8:23 Bastien Nocera
  2026-08-17 10:54 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Bastien Nocera @ 2026-08-17  8:23 UTC (permalink / raw)
  To: linux-bluetooth

*namelen was used before being set.

Fixes: bd8989620ed6 ("avrcp: Fix Out-of-Bounds Read in AVRCP GetFolderItems parsing")
---
 profiles/audio/avrcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 23e959c76917..028c1c254b82 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -2623,7 +2623,7 @@ static gboolean parse_media_name(uint8_t *operands, uint16_t len,
 	namesize = MIN(get_be16(&operands[name_len_offset]),
 			len - name_len_offset - 2);
 	namesize = MIN(namesize, NAME_MAX_LEN - 1);
-	if (*namelen > 0) {
+	if (namesize > 0) {
 		if (len < name_len_offset + 2 + namesize)
 			return FALSE;
 		memcpy(name, &operands[name_len_offset + 2], namesize);
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-17 10:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-17  8:23 [BlueZ] avrcp: Fix media/folder name not being set Bastien Nocera
2026-08-17 10:54 ` bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox